For some reason, this sorting code does not work as I would expect:
std::fstream theFile; theFile.open(<someFilename>, std::ios::beg |std::ios::out|std::ios::binary|std::ios::trunc); theFile << 1; //1 is being written as a string int var= 25; theFile << 25; //same thing, 25 is written as a string
What could be the problem? I am using the Microsoft C ++ compiler that comes with Visual Studio 2010.
source share