   file access problems
  Hello,For whatever reason, read data from a file, it wants to read data that isn't even in the file:char Header[] = "[SWNMV1.0]";char Read[sizeof(Header)];char ch;std::ifstream file;file.open(strFilename, std::ios::binary);file.read(Read, sizeof(Header)); Read[sizeof(Header)] = '\0'; //loc 1return S_OK; //loc 2In the debugger, I hold my mouse over the Read variable (loc 2), and all it shows are a bunch of "I"'s.If I hold it at location 1, it shows a bunch of "i"'s, followed by the data in my file.Thanks for any help,exorcist_bob   
  Well? Have you even reached that point in execution before inspecting the variable? Could you describe the problem in more detail? I don't think I get that behavior.Also, you have a buffer overflow. Change your code to either of the following:char Header[] = "[SWNMV1.0]";char Read[sizeof(Header) + 1];char ch;std::ifstream file;file.open(strFilename, std::ios::binary);file.read(Read, sizeof(Header)); Read[sizeof(Header)] = '\0'; //loc 1return S_OK; //loc 2Or:char Header[] = "[SWNMV1.0]";char Read[sizeof(Header)];char ch;std::ifstream file;file.open(strFilename, std::ios::binary);file.read(Read, sizeof(Header) - 1); Read[sizeof(Header) - 1] = '\0'; //loc 1return S_OK; //loc 2jfl.   ;  yeah, this is a common problem that i used to have when i was first learning how to do fileIOlike jfl said, you have a buffer overflow, which means its trying to read stuff when its not there, so it fills it with a "null" character, even tho its not really null, its just something that the file can read, even if it doesnt existtry his code, and that should work   