while ( input.read((char*)&b, sizeof(int)) )
{
cout << b << endl;
}