If the a.seekg(a.tellg()) is present, the output is
a
b
d
e
However, if I get rid of it, the output is
a
b
c
d
Is there a more reliable way to use tellg and seekg, or am I using the wrong methods? If I save the tellg value to a variable and later use it in seekg to come back, it also doesn't go to the correct position.