My program has a function that reads in information until it hits a designated character, takes the text just before that character, does something with it, and then comes back for more text starting at that designated character.
Special character is: 'z'
Text file: "This is a lot of text and I am only saying zune because it possess the character."
The first chunk : "This is a lot of text and I am only saying "
The second chunk: "zune because it possess the character."
My dilemma is that in order to check ahead and see the 'z', I need to first read in the z and then check its ascii number. This causes problems because the file pointer loses the 'z' and now is "une because it possess the character."
Is there any way to check ahead without losing information while reading? I'm looking for maybe a function call I overlooked or a method to do so. You do not need to present code.
Edited 5 Years Ago by BLUEC0RE: More Info