input

is there a function to compare the next item in a file without moving your spot in the file?
Last edited on
Example:
1
2
3
4
ifstream myfile("File.txt");
char ch;
myfile.get(ch); //reads the next character of the stream and moves position
myfile.peek(ch);//reads the next character without moving the position 
Thank you! thats exactly what i was looking for =D
Topic archived. No new replies allowed.