我有讀取功能的C++類的文件,即假定一個文件(就像Python做)的整個內容讀入緩衝區。然而,當我試圖從unistd.h中調用read函數,我得到:標準POSIX讀取由讀取方法陰影與不同的簽名
file.cpp:21: error: no matching function for call to ‘File::read(int&, char*&, int)’
file.cpp:17: note: candidates are: char* File::read()
我在做什麼錯?這些簽名完全不同,爲什麼我不能簡單地稱它?
你打算向我們展示代碼,還是隻讓我們猜測整天? – rlbond 2009-07-18 19:09:27
沒有代碼,你只能猜測。 – 2009-07-18 19:22:36