#include #include #include using namespace std; int main() { ifstream in ("test.bin", ios::binary); short *b = new short[10]; in.read((char*)b, 20); for (int i=0; i<10; i++) { printf("%X ", (unsigned short)b[i]); } cout << endl; in.close(); return 0; }