I’m having trouble reading a file in UTF8 encoding into a wchar_t buffer as I don’t know the file size in advance.
Does anyone know how I can read the whole file in a buffer?
I imagine I’d have to keep a wchar_t * (pointer) and resize it as I read. However that sounds very scary as I haven’t ever resized pointers before.
I’m doing Windows C++ programming with Microsoft Visual Studio.
Have you considered using a vector?