User forums > Using Code::Blocks
#include file not found
PetruD:
I've opened a .cpp file with C::B without inserting it in a project and when I tried to compile it, I got "fstream.h : no such file or directory". Am I missing something? Thank you in advance.
oBFusCATed:
Yes, a modern book to teach you modern c++ :)
zabzonk:
The header fstream.h is part of C++ from long, long ago before the language was standardised (which happened in 1998). You should not be using it in your code, and you should not be using learning resources that suggest you do use it. The header file you want is fstream, used as:
--- Code: ---#include <fstream>
--- End code ---
PetruD:
I am bound to use it in my code. I'm participating in an olympiad, and I am only allowed to use this particular header, or maybe stdio in my code.
zabzonk:
Well, it is an "olympiad" run by clueless, know-nothing chumps then. That header is not part of C++.
And this is off-topic. The problem you are having has nothing to do wiith Code::Blocks.
Navigation
[0] Message Index
[#] Next page
Go to full version