How do I output an address in a vector? Instead of its contents...

Hi.
I've got a short bit of code and what I'm trying to do is read from a text file using getline.
I would like to get the line number of a word when looping through a vector. I first read a text file into a vector. I would like to then search through that vector, but I cant find a way to output the vector position as a line number.
std::distance( vec.begin(), yourIterator );
That's cool! I didn't know about that one...
Topic archived. No new replies allowed.