Welcome to the new platform of Programmers Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use it's exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.
c++ IO streams or C FILE ???
are C++ IO streams really used for binary IO? If so, any quick reference to examples (I guess I have to buy the book Standard C++ IOStreams and Locales) ??
whenever I try to use IO streams instead of good old C FILE* (although more work) i run into problems:
std::fstream fs(std::ios_base::in | std::ios_base::out);
fs << "hello world";
// [red] now i want to delete (purge) the entire file contents[/red]
// sure i can close/reopen and truncate....but dont' want to have to close file