Read text line in file and display it in console

  • Thread starter Thread starter Languageware
  • Start date Start date
L

Languageware

Guest
ifstream inFile;
inFile.open("myfile.txt");
string line;
while (getline(inFile, line));
{
cout << line << endl;
}
inFile.close();


Deletes the line of text in the file and does not display it on the screen of console application. Something is missing perhaps.




Continue reading...
 
Back
Top