Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- fstream file("path", std::fstream::binary | std::fstream::in);
- unsigned char buf[2];
- file.read((char*)buf, 2);
- file.close();
- uint16_t num = buf[0] | (buf[1] << 8);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement