Message-ID: <19990521050908.31888.qmail@hotmail.com> X-Originating-IP: [202.54.87.102] From: "chirayu krishnappa" To: djgpp AT delorie DOT com Subject: need workaround Date: Thu, 20 May 1999 22:09:08 PDT Mime-Version: 1.0 Content-type: text/plain; format=flowed; Reply-To: djgpp AT delorie DOT com The following code fails to work. (using GCC 2.8.1 - its *cool*) #include #include int main() { fstream f("test"); f.peek(); cout << f.tellg() << " " << (char) f.get(); } The file "test" contains the string ABCD. The program incorrectly displays "1 B" instead of "0 A". (This behaviour happens if peek() is called as above). Anyone can suggest a workaround? (get() followed by putback() does not help). ______________________________________________________ Get Your Private, Free Email at http://www.hotmail.com