#include <iostream>
#include <fstream>
#include <ostream>
#include <string>
usingnamespace std;
using std::ofstream;
using std::ifstream;
int getLineNumber();
void checkFile();
int main(int argc, char* argv[]){
int x = getLineNumber();
cout << "There are " << x << " Lines in the file." << endl;
//cout << "--------Hello and welcome to Anikan's Phone Book application!--------" << endl;
//cout << "Here are all of the contacts listed in your phone book:" << endl;
//cout << "_______________________________________________________" << endl;
//for(int i = 0; i < 100; i ++)
}
int getLineNumber(){
string line;
int numberOfLines;
ifstream dataLogFile("contacts.txt");
if(dataLogFile.is_open()){
while(getline(dataLogFile, line)){
numberOfLines++;
}
//dataLogFile.close();
}
return(numberOfLines);
}
void checkFile(){
ofstream outputFileStream("contacts.txt");
if(!outputFileStream)
cout << "The File doesn't exist!" << endl;
else
cout << "The File does exist!" << endl;
}