#include <fstream>
#include <iostream>
usingnamespace std;
#include <conio.h>
int main()
{
string line;
ifstream a_file ( "example.txt" );
if ( !a_file.is_open() ) {
// The file could not be opened
}
else {
getline (a_file,line);
cout<<line<<endl;
}
a_file.close();
while(_kbhit()) _getch(); //first clear all key events from the console input buffer
_getch(); //wait for the user to press a key
return 0;
}
}