The solution is to read the file line by line, printing out each line, and pausing after 50-100 lines, whatever pleases you
Code:
#include <iostream>
#include <fstream>
using namespace std;
int main()
{
int lines=0;
ifstream input;
char line[255];
input.open("filename");
if(input.fail() )
{
cout << "error with file";
return 0;
}
do
{
input.getline(line,254,'\n');
lines++;
cout << line << endl;
if( lines % 50 == 0 ) // change this to display more or less lines before pausing
{
cout << "Press ENTER to continue " << endl;
cin.ignore(100,'\n');
//wait for the user to press enter
//the 100 is incase they enter junk chars before they press enter
}
}
while( ! input.eof() );
return 0;
}