Advertisement
Guest User

Untitled

a guest
Oct 17th, 2022
38
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.17 KB | None | 0 0
  1. fstream file("path", std::fstream::binary | std::fstream::in);
  2. unsigned char buf[2];
  3. file.read((char*)buf, 2);
  4. file.close();
  5.  
  6. uint16_t num = buf[0] | (buf[1] << 8);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement