关于文件读取的一些问题,求大佬指教。

下面的程序是从一个图片文件中读取数据,在Ultraedit中前两个字节明明显示为
42 4D,但是用下面的程序读出来之后就变成了 47 49。求大佬指教。原图

Ultraedit

#include
#include

using namespace std;

void ReadBmp(string bmpname){

string BmpName = bmpname + ".jpg";

ifstream fin;

fin.open(BmpName.c_str(), ios::binary);

if(!fin.is_open()){
    cout << "file can not be opened\n";
    return ;
}   

cout << hex;

cout << 15 << endl;

int x = fin.get();
cout << x << " ";

x = fin.get();
cout << x << " ";

}

int main(){

ReadBmp("FLOWER");

return 0;   

}

在我的电脑上跑了一遍你所给的程序,结果还是42 4d.