I done some reading on the seekg and tellg methods, seems fitting.
The code i've written seems to have counted the characters. how could i re-write to count the lines. also the random "line" produced is always equal to character y for some reason..
using namespace std;
string selected = "";
int lines = 0;
ifstream inputFile ("noun.txt");
if(inputFile.is_open() && inputFile != NULL)
lines = inputFile.tellg();
inputFile >> selected;
cout << selected << endl;
cout << lines << endl;
cout << "Error with file" << endl;