View Single Post
Re: std::fstream Is not writing :(
Old
  (#4)
koraX
Member
 
koraX's Avatar
 
Status: Offline
Posts: 145
Join Date: Jan 2004
Location: Slovak Republic
Default Re: std::fstream Is not writing :( - 26-02-2005

omg, messy code.

Why do you have pointers to fstream ?
Tell me what precisely this function should do and I'll fix it.


after new, check !m_fCrashstatus is totally useless. If allocation fails, exception will be thrown.

eof doesn't return true if file size is 0.

use std::fstream::binary instead of std::ios.binary, same for other types.

write ("Test!\n", 6), not write("Test!\n", 7). you cannot assume that \n is 2 characters. If you want to write \n, use text mode.


kXBot
koraX's utils
- see my homepage for other projects (OpenGL CSG Editor, FAT16 Sim, NNetwork Sim, ...)
  
Reply With Quote