Hi,
I am a newbie to C++ and want to know how to parse thru a binary file. I am having some trouble with some simple code.
I have a sample binary file(test.bdb) that has "0069 0045 0089 0090" in the file.
Here is my code for the file.
ifstream infile;
infile.open("test.bdb", ios::in | ios::binary);
char* buffer = new char[4];
infile.read(buffer, 4);
I can't seem to read the binary file correctly. I just want to first be able to parse for "0069"(first entry of the binary file) butI don't see "0069" in buffer when I run the program. Can anyone tell me what I am doing wrong? Thanks.