文件打不开...
程序代码:#include <fstream>
#include <iostream>
#include <string>
using namespace std;
int main(void)
{
char a[10];
ofstream outfile( "E:\练习文件\a.dat", ios::out);
if(!outfile)
{
cout << "open error!!";
exit(-1);
}
for(int i = 0; i < 10; i++)
{
cin >> a[i];
outfile<< a[i] << " ";
}
outfile.close();
return 0;
}不设路径的没问题,但设路径就打不开了,,“E:\练习文件 ”这个文件是存在的.那里出错了呀??




