the values in the file are NOT hex -- they are binary. you have to convert them to the desired displayable format. Something like below.
There is no such flag as ios::hex in the open statement -- look up open() and you'll see that it should be ios::binary.
Code:
char beh[11];
char text[40] = {0};
char tmp[8];
ifstream updatedat("c:/sol.exe", ios::binary | ios::in);
updatedat.seekg(10,ios::end);
updatedat.read(beh,10);
for(int i = 0; i < 10; i++)
{
sprintf(tmp,"%X ",beh[i]);
strcat(text,tmp);
}
MessageBox(NULL,text,"here it is", MB_OK);
updatedat.close();