I am writing a C++ program that reads a file and then sends it to another class as a character array. Because character arrays only get passed by pointer, all size is lost.
The file it'll be reading will be a text file. Are text files null terminated?
Preferably I do not want to use a Vector as I really don't need any of it's features but the size of the array.
No.
Files have a known length, so they do not need any terminator byte.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With