[問題] VC ++ 6.0將資料存入 記事本

看板C_and_CPP (C/C++)作者 (watson)時間12年前 (2013/12/06 13:54), 編輯推噓0(004)
留言4則, 4人參與, 最新討論串1/1
開發平台(Platform): (Ex: VC++, GCC, Linux, ...) vc++ 6.0 額外使用到的函數庫(Library Used): (Ex: OpenGL, ...) 問題(Question): #include <fstream.h> #include <string.h> int main(int argc, char* argv[]) { ofstream File1; float Data[3]={8.954,1235,3548}; float Num[3]={12,253,654}; File.open("C:\\File.txt"); for(int i=0;i<4;i++) { File1 <<Data[i] <<endl; cout << 寫入Data值: "<< i << "完成!" <<endl; File1<<num[i]<<endl; cout << "寫入 num值: " <<i<< "完成!" <<endl; } return 0; } 我DEBUG後 出現了 Cannot open precompiled head file: 'Debug/file1.pch': No such file or directory http://ppt.cc/ZIE1 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 140.124.249.111

12/06 14:25, , 1F
12/06 14:25, 1F

12/06 16:17, , 2F
預編譯頭文件… 頭文件D 喔耶
12/06 16:17, 2F

12/06 19:07, , 3F
變數名稱File1,開檔名稱是File? 打錯嗎?
12/06 19:07, 3F

12/06 21:48, , 4F
搞定了~~謝謝各位^^
12/06 21:48, 4F
文章代碼(AID): #1IeMQ8Pj (C_and_CPP)
文章代碼(AID): #1IeMQ8Pj (C_and_CPP)