[問題] MFC struct 寫檔問題
開發平台(Platform): (Ex: VC++, GCC, Linux, ...)
VS2005 MFC win32
額外使用到的函數庫(Library Used): (Ex: OpenGL, ...)
問題(Question):
餵入的資料(Input):
預期的正確結果(Expected Output):
錯誤結果(Wrong Output):
程式碼(Code):(請善用置底文網頁, 記得排版)
struct data_food food ;
CStdioFile file_to_ascii;
file_to_ascii.Open( path_to_food , CFile::modeCreate | CFile::modeWrite ) ;
file_to_ascii.Write( food , sizeof(struct data_food) );
補充說明(Supplement):
請問要怎麼把結構(struct data_food food)整包寫到 外部.txt檔???
使用 file_to_ascii.Write 會有錯誤訊息
無法將參數 1 從 'CServerSocketDlg::data_food' 轉換成 'const void *'
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 114.41.126.242
→
11/28 22:52, , 1F
11/28 22:52, 1F
C_and_CPP 近期熱門文章
PTT數位生活區 即時熱門文章
14
43