I'm trying to write a program that will allow me to read 24 lines of data from a file at a time. After that has occurred, pause the output until user presses enter. Then continue to the rest of the data. For some reason when I run the code below I do not get any output at all. I figure that I need some sort of loop that will cause the program to stop every 24 lines. Please help!
CODE
#include<fstream>
#include<string>
#include<iostream>
using namespace std;
int main()
{
ifstream dataFile;
string buffer;
char ch;
char fileName[81];
cout << "Please enter the name of the file: ";
cin.getline(fileName, 81);
dataFile.open(fileName, ios::in);
cout << "Reading information from the file. \n\n";
getline(dataFile, buffer);
cout << buffer << endl;
cout << "Press Enter when ready to continue.";
cin.get(ch);
dataFile.close();
cout << "\nDone. \n";
return 0;
}