Hi,guys,
I am new to C++,and recently I practice to read a file with visual studio 9.0,but it turns out that it cannot find the very file!
#include<iostream>
#include<fstream>
#include<string>
#include<iomanip>
#include<cstdlib>
#include<vector>
using namespace std;
//using namespace stdext;
int main()
{
ifstream inClientFile("Dic.dat",ios::in);
if(!inClientFile)
{
cerr<<"File could not be opened"<<endl;
exit(1);
}
...
I ensure that the file "Dic.dat" do exist in the same file of the project,but the program only display the message "File could not be opened".