I have to read from a file one character at a time (can't read it using a string!) and if I find a //
then I must ignore everything until I get to the end of the line.
If you don't want to use a state machine, I note that the ifstream class has a peek()
method that you could use to look-ahead one character without needing to get then put back