1>Project : error PRJ0003 : Error spawning 'rc.exe'.. 这是我在尝试运行这个读写文件的小练习程序时遇到的错误,由于我无法执行,我无法执行此操作让文件正确打开。我使用 microsoft visual c++ 2008,并且我也使用了文件路径来尝试打开文件,但我不能有人帮忙吗?
#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;
}