this only shows one string of the file, what should i do to show the entire text ont the file?Code:ifstream a_file( "Data.1" );
a_file>> x;
cout<< x <<"\n";
Printable View
this only shows one string of the file, what should i do to show the entire text ont the file?Code:ifstream a_file( "Data.1" );
a_file>> x;
cout<< x <<"\n";
use getline()
Code:std::string line;
getline(a_file,line);
cout << line << endl;