What would be the best way to get the line number of the current line in a file that I have opened with a ifstream? So I am reading in the data and I need to store
Use std::getline to read each line in one by one. Keep an integer indicating the number of lines you have read: initialize it to zero and each time you call std::getline and it succeeds, increment it.