User forums > Using Code::Blocks

Missing ifstream and ofstream

(1/2) > >>

Maulrus:
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?

ollydbg:
It should work ok.
Post your full build log.
Post your code, then others can test for you.

Maulrus:
Build log:


--- Quote ---Compiling: 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
--- End quote ---

Code:


--- Code: ---#include <ifstream>

int main(){}
--- End code ---

This wasn't the code that I had the problem with originally, but it still gives me the same error.

ollydbg:
ifstream - C++ Reference

BTW: this question is totally unrelated to Codeblock, so, it violate the forum rule!!!

Maulrus:
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.

Navigation

[0] Message Index

[#] Next page

Go to full version