I can't seem to get it to work. I've tried using the full path name, as well as putting the file in the same directory as the dev c++ folder, but I am unable to open the file. Here's my code:
Code:#include <iostream>
#include <fstream>
using namespace std;
int main()
{
ifstream inFile("C:\\Documents and Settings\\user 3\\My Documents\\TestData\\data.txt");
if(!inFile)
{
cout<<"error opening file"<<endl;
}
system("PAUSE");
return 0;
}
