swimming up stream
-
the C++ file stream behavior wrt openmode is not intuitive at least not to me . so my code was not behaving properly . as a result i tested its behavior with every combination of openmode values . ChatGBT was nice enough to write the combination generating code for me . so i now have a compendium of results to rely on and can now find the correct openmode values required for any situation .
-
As I'm not a regular C++ programmer I once had a similar problem, it was not clear to me the stream was written in text instead of binary format. Took me a very long time to find out what the problem was ...
-
As I'm not a regular C++ programmer I once had a similar problem, it was not clear to me the stream was written in text instead of binary format. Took me a very long time to find out what the problem was ...
-
opening an existing file w/
ios_base::out
causes its contents to disappear . to write to a existing fileseekp
'ed position requiresios_base::in | ios_base::out
. to write to a non-existing fileseekp
'ed position requiresios_base::out
. -
opening an existing file w/
ios_base::out
causes its contents to disappear . to write to a existing fileseekp
'ed position requiresios_base::in | ios_base::out
. to write to a non-existing fileseekp
'ed position requiresios_base::out
. -
Yes, but that follows the basic IO model from C (OPEN, READ, fopen, fread etc.), and the Windows API (CreateFile, ReadFile ...). All use the same basic concepts, and the difference between writing binary data and text has always been there.
I hate that they cook text. I hate it so much. I once spent an entire day debugging my TTF engine because the IoT code I was using was opening my font file in text mode. The thing is, 90% of it worked.
Check out my IoT graphics library here: https://honeythecodewitch.com/gfx And my IoT UI/User Experience library here: https://honeythecodewitch.com/uix
-
I hate that they cook text. I hate it so much. I once spent an entire day debugging my TTF engine because the IoT code I was using was opening my font file in text mode. The thing is, 90% of it worked.
Check out my IoT graphics library here: https://honeythecodewitch.com/gfx And my IoT UI/User Experience library here: https://honeythecodewitch.com/uix
-
Yes, but that follows the basic IO model from C (OPEN, READ, fopen, fread etc.), and the Windows API (CreateFile, ReadFile ...). All use the same basic concepts, and the difference between writing binary data and text has always been there.
CreateFile offers many options . all intuitive . how can deleting the contents of a file for output be intuitive . how can requiring read privileges in order to write be intuitive . never mind it is part of this or that IO model .
-
CreateFile offers many options . all intuitive . how can deleting the contents of a file for output be intuitive . how can requiring read privileges in order to write be intuitive . never mind it is part of this or that IO model .
-
the documentation for openmode::out : "out open for writing" doesn't Howard Wolowitz do something w/ documuntation .