Should work. But i never used that 'ifstream' thingy. This is the way how i use it, and it works in both dos and win.
FILE *fin;
float f;
fin = fopen( "this.one", "rb" ); //rb means read-binary
if ( fin != NULL ) {
fread( &f, 1, 4, fin ); //size of float = 4 bytes
fclose( fin );
}