I find trying to lay out data files with the C++ IOStream stuff to be like pulling teeth. Good old fashioned unix read() and write() is much less painful, especially for binary formats. For text formats printf()/scanf() are king. But that's just me. I'm sure that IOStream has a mode for sending and reading raw bytes. Use that.
not too much different than how you wrote to file: Code: double myData; ifstream infile("data.bin", ios::in|ios::binary); infile.read((char*)&myData, sizeof myData); @bigD: like pulling teeth?... care to show a simpler version using read()?