From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20248 invoked by alias); 27 Sep 2002 19:09:39 -0000 Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org Received: (qmail 20153 invoked from network); 27 Sep 2002 19:09:38 -0000 Received: from unknown (HELO smtp-relay-1.adobe.com) (192.150.11.1) by sources.redhat.com with SMTP; 27 Sep 2002 19:09:38 -0000 Received: from inner-relay-2.corp.adobe.com (inner-relay-2 [153.32.1.52]) by smtp-relay-1.adobe.com (8.12.3/8.12.3) with ESMTP id g8RJC8VN019095 for ; Fri, 27 Sep 2002 12:12:08 -0700 (PDT) Received: from iplan-mn.corp.adobe.com (iplan-mn.corp.adobe.com [130.248.25.5]) by inner-relay-2.corp.adobe.com (8.12.3/8.12.3) with ESMTP id g8RJ71vW023897 for ; Fri, 27 Sep 2002 12:07:01 -0700 (PDT) Received: from [130.248.25.159] ([192.150.11.13]) by iplan-mn.corp.adobe.com (Netscape Messaging Server 4.15 mn Jul 11 2001 16:32:57) with ESMTP id H342JW00.VV2; Fri, 27 Sep 2002 14:09:32 -0500 User-Agent: Microsoft-Entourage/10.0.0.1331 Date: Fri, 27 Sep 2002 12:09:00 -0000 Subject: Re: ios:nocreate From: John Love-Jensen To: , Message-ID: In-Reply-To: <200209271729.g8RHTfL01028@spiderman.marc.com> Mime-version: 1.0 Content-type: text/plain; charset="US-ASCII" Content-transfer-encoding: 7bit X-SW-Source: 2002-09/txt/msg00220.txt.bz2 Hi Yu-Lun, The ios::nocreate setting did not make it into the ISO 14882:1998 C++ standard. Too platform specific. You can simulate that behavior with: fstream foo("foo.txt", ios_base::in); if(!fs) { // File does not exist. // Do not create one. } else { foo.close(); foo.open("foo.txt", ios_base::out); } Note: the ios::xxxxx settings are from the defunct header file. While the ios_base::xxxxx are from the (notice, no .h suffix) header file, within the std namespace. --Eljay