This is the mail archive of the
cygwin@sourceware.cygnus.com
mailing list for the Cygwin project.
B19: problem with istream::tellg() under Win95
- To: gnu-win32 at cygnus dot com
- Subject: B19: problem with istream::tellg() under Win95
- From: user <user at cinema06 dot us dot es>
- Date: Fri, 21 Aug 1998 11:44:28 +0200
- Organization: us
- Reply-To: boris dot holscher at post dot rwth-aachen dot de
Hi,
The call of istream::tellg() on an input file stream causes a move of
the actual reading position. This seems to happen in connection with the
use of istream::get(char).
Test program:------------------------------------------------------
#include<fstream.h>
void main()
{
ifstream fileS("mbinput.txt");
char c;
streampos pos;
while (fileS)
{
fileS.get(c);
if (c=='=') {pos=fileS.tellg();};
cout << c;
};
cin >> c;
}
-------------------------------------------------------------
On the first ocurrence of '=' in "mbinput.txt" the current read position
jumps forwards some characters. Is this a bug?
Thanks for help (if possible as email to me)
Boris.
-
boris.holscher@post.rwth-aachen.de
boris@esi.us.es - www.esi.us.es/~boris
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".