Dev C++ Error 1

Mar 13, 2011 at 11:13pm
I have this part of code:
1
2
ifstream tfile(textfile);
tfile >> word;


where textfile is a filename I have asked the user earlier. The program outputs:

...\Makefile.win [Build Error]  [Gloss2Lang.exe] Error 1
Mar 13, 2011 at 11:34pm
Dev C++ is not only evil, but is it also an abomination.

Aside from that, you probably forgot to include the fstream header.
Mar 13, 2011 at 11:55pm
I didn't
Mar 14, 2011 at 1:05am
closed account (S6k9GNh0)
Here ya go: http://cplusplus.com/forum/articles/36896/
Mar 14, 2011 at 6:09pm
In that case, you got one or more random errors. For example, linkers usually fail with an error if the name of the executable they are trying to create is the name of an executable that is already running.
Mar 14, 2011 at 6:29pm
ifstream is located in namespace std. do you have using namespace std; somwhere in your code? if not ifstream should be std::ifstream.
Topic archived. No new replies allowed.