I'm just getting into using the ostream to write text files. For some reason, I keep running into some sort of maximum file size. My code initially worked fine when I was creating a smaller output file. As it's grown in size, my program now aborts before all of the output is written to the file. If I shorten the size of the initial lines (remove blank space, replace spaces by tabs, ect), I can get a few more characters to show up at the end of the file before the abort takes place.
My code looks something like this:
ofstream os;
os.open("file.txt"
start program loop...
os.write(buffer, strlen(buffer);
end program loop...
os.close();
Am I overlooking something? I've tried playing with the os.flush command, and it seems not to be helping my problem. The visual C++ documentation is very confusing on this item, as it seems to be a very generic class.
Thanks much for your help.
My code looks something like this:
ofstream os;
os.open("file.txt"
start program loop...
os.write(buffer, strlen(buffer);
end program loop...
os.close();
Am I overlooking something? I've tried playing with the os.flush command, and it seems not to be helping my problem. The visual C++ documentation is very confusing on this item, as it seems to be a very generic class.
Thanks much for your help.