// FILE: fq.cc //PURPOSE: Can you mix normal ">>" input with ".open" etc? #include // required for EXIT_FAILURE etc #include // required for external file streams int main() { ifstream ifs; double number; ifs.open("fq.data"); if( ifs.fail() ) return EXIT_FAILURE; ifs>>number; //notice that you *have* to read ahead while ( !ifs.eof ()) // while not at end of file(set after failing to>>) { cout<>number; } // end while ifs.close(); return EXIT_SUCCESS; } // end copy_line