Why we should use ios::in or ios:ut when we use ifstream or ofstream respectivly?
It is obvious that we want to input data when we use ifstream.
Why we should use ios::in or ios:ut when we use ifstream or ofstream respectivly?
It is obvious that we want to input data when we use ifstream.
Learn C++ (C++ Books, C Books, FAQ, Forum Search)
Code painter latest version on sourceforge DOWNLOAD NOW!
Download FSB Data Integrity Tester.
Siavosh K C
You need them for the fstream, which is not quite sure what it's going to do until you tell it ios::in or ios:ut.
But I've seen many places where it came with ifstream or ofstream.
Learn C++ (C++ Books, C Books, FAQ, Forum Search)
Code painter latest version on sourceforge DOWNLOAD NOW!
Download FSB Data Integrity Tester.
Siavosh K C
std::ifstream and std:fstream automatically have std::ios::in and std::ios:: out respectively. std::fstream requires you to specify them though.
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
OK, Why we should use ofstream or ifstream when fstream exists?
Learn C++ (C++ Books, C Books, FAQ, Forum Search)
Code painter latest version on sourceforge DOWNLOAD NOW!
Download FSB Data Integrity Tester.
Siavosh K C