#include <iostream>
#include <fstream>
using namespace std;
int main ()
{
const char *FILENAME = "data.bin";
int n = 98631;
ofstream o(FILENAME, ios::binary);
o.write((char*)&n, sizeof(n));
o.close();
int tmp = 0;
ifstream i(FILENAME, ios::binary);
i.read((char*)&tmp, sizeof(tmp));
i.close();
cout << tmp;
return 0;
}
/*
run:
98631
*/