Najjednoduchšie nejako takto:
#include <iostream>
#include <fstream>
int main() {
std::ifstream input("subor.in", std::ios::in | std::ios::binary);
char c;
std::cout << std::hex;
while (input.get(c))
std::cout << (unsigned)c << " ";
return 0;
}