delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/12/19/07:57:54

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Message-ID: <09C1525B7197D3118A4D0008C7E6EEE007CD3082@zuk28exm05.ecid.cig.mot.com>
From: Zhabitsky Oleg-QOZ001 <Oleg DOT Zhabitsky AT motorola DOT com>
To: cygwin AT cygwin DOT com
Subject: RE: c++ ifstream problem with gcc 3.2
Date: Wed, 18 Dec 2002 21:07:43 -0000
MIME-Version: 1.0

Hello Gerrit,

I've faced the same problem after installation gcc 3.2.
How I solved it in my program:

      ifstream cur_stream(file_name1, ios::in);
      ......
      cur_stream.close();
      cur_stream.clear();
      cur_stream.open(file_name2, ios::in);
      ....

Hope, it'll help you.

Best regards,
Zhabitsky Oleg

> 
> Hello,
> 
> I recently encountered the problem with the gcc 3.2 compiler 
> of cygwin 
> using ifstream. Basically it is the same problem as mentioned in 
> http://gcc.gnu.org/ml/gcc-help/2002-06/msg00079.html although 
> this is about 
> gnu cc 3.0. I thought that this was already fixed. The 
> problem is that when 
> a ifstream object is closed and than reopened with the open 
> method to open 
> another file, no data is returned. But if one uses 2 ifstream 
> objects, 
> everything works perfectly. Is this a known issue with c++ on cygwin ?
> 
> Gerrit.

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019