A thought to pondor: #include <fstream>
will give me errors about if/ofstream not being declared, where as #include <fstream.h> does not (If I can get it to compile as a deprecated header fill )
-SirCrono6
A thought to pondor: #include <fstream>
will give me errors about if/ofstream not being declared, where as #include <fstream.h> does not (If I can get it to compile as a deprecated header fill )
-SirCrono6
From C to shining C++!
Great graphics, sounds, algorithms, AI, pathfinding, visual effects, cutscenes, etc., etc. do NOT make a good game.
- Bubba
IDE and Compiler - Code::Blocks with MinGW
Operating System - Windows XP Professional x64 Edition
OR:Code:#include <fstream> using namespace std;
Code:#include <fstream> using std::ifstream; using std::ofstream;
Thankyou! That worked, but now I'm using ios::nocreate too. I figured out using std::ios, but for the nocreate part it says: `nocreate' is not a member of type:
OS: Windows MECode:ifstream Read("Save.ini",ios::nocreate);
Compiler: BloodShed Dev-C++ 4.9.8.0
-SirCrono6
From C to shining C++!
Great graphics, sounds, algorithms, AI, pathfinding, visual effects, cutscenes, etc., etc. do NOT make a good game.
- Bubba
IDE and Compiler - Code::Blocks with MinGW
Operating System - Windows XP Professional x64 Edition
ios::nocreate was removed from standard c++, you may use ios::in to open the file for reading, and not create one if it doesn't exist.
The file shouldn't be created if you have a standard compliant compiler. (I think dc++ is)
here is a list of the available flags:
http://www.cppreference.com/cppio_de...tml#mode_flags