I just installed Code::Blocks 10.5 with MinGW. I'm compiling a project when it gives me an error: ifstream: No such file or directory. I get the same error for ofstream. I go into the include folders and, to my surprise, they're not there! Everything else seems to be, including fstream, is in there. What happened, and where can I get these headers?
It should work ok.
Post your full build log.
Post your code, then others can test for you.
Build log:
QuoteCompiling: C:\CodeBlocks\Exercises\test.cpp
C:\CodeBlocks\Exercises\test.cpp:1:20: error: ifstream: No such file or directory
Process terminated with status 1 (0 minutes, 0 seconds)
1 errors, 0 warnings
Code:
#include <ifstream>
int main(){}This wasn't the code that I had the problem with originally, but it still gives me the same error.
ifstream - C++ Reference (http://www.cplusplus.com/reference/iostream/ifstream/ifstream/)
BTW: this question is totally unrelated to Codeblock, so, it violate the forum rule!!!
That link doesn't really help me at all.
I posted it here because I installed MinGW from the C::B installer, which led to me to believe the problem had something to do with C::B. I apologize if this is actually the wrong forum for it.
No, please reread the link carefully, the ifstream class is declared in fstream .
BTW: My last post in this thread.
Wow I am a dumbass.
Sorry for refusing your help earlier, this can be deleted or closed or whatever.