#include <fstream> #include <iostream> using namespace std; int main () { char buffer[256]; ifstream myfile ("test.txt"); while (! myfile.eof() ) { myfile.getline (buffer,100); cout << buffer << endl; } return 0; }
10 123.23 This is a text.