getting error

Hi friends
I am using Dev-C++ 5.9.2 version and when I use this statement I always get error please help me... where "file" is a string where the file name is being taken from user.

 
  ifstream myfile(file);
What does the error say, exactly?


Look at the ifstream constructors: http://www.cplusplus.com/reference/fstream/ifstream/ifstream/
The list is different in C++11 than in C++98.


The Dev-C++ is an IDE that merely uses some compiler. The compiler can be changed. There seems to be an update for the Dev-C++ too: http://orwelldevcpp.blogspot.fi/
The "default compiler" mentioned there is a port of GCC and GCC by default does operate in "C++98 and GNU extensions" mode. You need to pass it appropriate "-std=" option to enable support for newer standard.
Topic archived. No new replies allowed.