The file streams from
The Standard C++ Library are also an option.
They don't require
MFC (
CFile
does) and they are not OS specific (
CreateFile
and
SetFilePointerEx
are Windows specific APIs).
You can use
std::ofstream[
^].
See the documentation for
std::ofstream::open[
^] and. You can use something like:
std::ofstream myfilebin, myfiletxt;
myfilebin.open ("example.bin", std::ios::out | std::ios::app | std::ios::binary);
myfiletxt.open ("example.txt", std::ios::out | std::ios::app);
For additional details refer to
this[
^] article.