why std::wofstream do not print all wstring into file?
I have a std::wstring whose size is 139,580,199 characters. For debugging I printed it into file with this code: std::wofstream f(L"C:\\some file.txt"); f << buffer; f.close(); After that noticed that the end of string is missing. The created file size is 109,592,584 bytes (and the "size on disk" is 109,596,672 bytes). Also checked if buffer contains null chars, did this: size_t pos = buffer.find(L'\0'); Expecting result to be std::wstring::npos but it is 18446744073709551615 , but my string doesn't have null char at the end so probably it's ok. Can somebody explain, why I have not all string