C++: Store read binary file into buffer
问题 I'm trying to read a binary file and store it in a buffer. The problem is, that in the binary file are multiple null-terminated characters, but they are not at the end, instead they are before other binary text, so if I store the text after the '\0' it just deletes it in the buffer. Example: char * a = "this is a\0 test"; cout << a; This will just output: this is a here's my real code: this function reads one character bool CStream::Read (int * _OutChar) { if (!bInitialized) return false; int