I have a big file full of integers that I\'m loading in. I\'ve just started using C++, and I\'m trying out the filestream stuff. From everything I\'ve read, it appears I c
To read a single integer, pass in the address of the integer to the read function and ensure you only read sizeof int bytes.
sizeof int
int myint; //... fstr.read(reinterpret_cast(&myint), sizeof(int));
You may also need to open the file in binary mode
fstr.open("table.dat", std::ios::binary);