How to get the line number from a file in C++?

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 the line number that it is on so that I can display it later if the data doesn't match the specifications.

11
задан templatetypedef 27 January 2011 в 05:46
поделиться