Tip #3: Massive Files with iostreams
The old C++ Win64 STL had a maximum size of 4GB for files, even compiling as 64-bit. That meant if you used iostreams to handle a large file, you were out of luck. (Isn’t it good we replaced our STL?)
In 12.2, the new Win64 RTL keeps this by default (in 12.2) but can support massive files!
Just define: _FILE_OFFSET_BITS=64 in the compiler options.
Or, on the command line: -D_FILE_OFFSET_BITS=64
We might enable this by default in the next release.
Bonus tip: check out the RTL TEncoding class. This, with stream support, make it much easier to handle text encodings than C++’s default classes to, plus of course already support 64-bit file sizes, and you get great performance with TBufferedFileStream. But if you want to use the STL, with the new C++Builder you’re ok there too!