#include <iostream.h> #include <conio> #include <string> #include <fstream.h> //using namespace std; using namespace std; void main() { ifstream inFile("t.txt"); string line; if(inFile.fail()) { cout<<"Error hapen when trying to open the file"<<endl; } else { while(!inFile.eof()) { getline(inFile,line); cout << "> " << line << endl; } } getch(); }
infile.getline(line,X);
.h
fstream.h
iostream.h
conio
#include <iostream> #include <string> #include <fstream>
#include
#include <iostream> #include <conio.h> #include <string> #include <fstream>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)