1>項目:錯誤PRJ0003:錯誤產卵'rc.exe'..這是我得到的錯誤,當我嘗試運行這個閱讀的小練習程序並編寫我不能做的文件,因爲我無法正確打開文件。我使用微軟的Visual C++ 2008和我已經使用文件路徑來嘗試打開該文件以及我不能有人可以幫助?1>項目:錯誤PRJ0003:產生'rc.exe'錯誤
#include <iostream>
#include <fstream>
using namespace std;
int main()
{
ifstream infile;
ofstream myfile;
int num;
infile.open("example.txt");
if(infile.fail())
{
cout << "error" << endl;
}
myfile.open ("example.txt");
if(infile.fail())
{
cout << "error" << endl;
}
while(!infile.eof())
{
example >> num;
}
while(!myfile.eof())
{
example << num;
}
infile.close();
myfile.close();
return 0;
}
嗨,歡迎來到SO。您可以通過突出顯示並按下ctrl-k來正確地格式化您的代碼。 – bernie 2010-04-24 17:38:23
非常感謝,我不知道 – user320950 2010-04-24 17:38:57
它看起來像你的錯誤不是在運行程序,而是在編譯它。 – Yuliy 2010-04-24 17:46:17