It is not difficult. For instance with the 'quick and dirty' approach the content of a binary file (assumed to contain 32 bit integers) is reported in decimal representation on the standard output.
nclude <iostream>
#include <fstream>
#include <stdint.h>
using namespace std;
union MU
{
char buf[4];
uint32_t u32;
};
int main( int argc, char * argv[])
{
MU mu;
if ( argc < 2) return -1;
ifstream ifs(argv[1], ios::binary);
while (ifs.good())
{
if ( ifs.read(mu.buf, sizeof(mu)).good())
{
cout << mu.u32 << endl;
}
}
}