This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: libstdc++/5629: fstream class is unable to create file in a read/write mode
- From: "Alex Pakhomov" <apakhomov at secant dot com>
- To: <paolo at gcc dot gnu dot org>, <apakhomov at secant dot com>, <gcc-bugs at gcc dot gnu dot org>, <gcc-prs at gcc dot gnu dot org>, <nobody at gcc dot gnu dot org>, <gcc-gnats at gcc dot gnu dot org>
- Date: Thu, 7 Feb 2002 18:17:03 -0500
- Subject: Re: libstdc++/5629: fstream class is unable to create file in a read/write mode
- References: <20020207224936.32548.qmail@sources.redhat.com>
Hi Paolo,
Here is the missing code:
#include <fstream>
#include <unistd.h>
using namespace std;
int main()
{
char text[256];
fstream* fs = new fstream("test.tmp",ios::out|ios::in);
strcpy(text,"This is a test\n");
fs->write(text,strlen(text));
fs->close();
delete fs;
}
Thanks.
-Alex
----- Original Message -----
From: <paolo@gcc.gnu.org>
To: <apakhomov@secant.com>; <gcc-bugs@gcc.gnu.org>; <gcc-prs@gcc.gnu.org>;
<nobody@gcc.gnu.org>; <paolo@gcc.gnu.org>
Sent: Thursday, February 07, 2002 5:49 PM
Subject: Re: libstdc++/5629: fstream class is unable to create file in a
read/write mode
> Synopsis: fstream class is unable to create file in a read/write mode
>
> Responsible-Changed-From-To: unassigned->paolo
> Responsible-Changed-By: paolo
> Responsible-Changed-When: Thu Feb 7 14:49:35 2002
> Responsible-Changed-Why:
> Analyzed.
> State-Changed-From-To: open->feedback
> State-Changed-By: paolo
> State-Changed-When: Thu Feb 7 14:49:35 2002
> State-Changed-Why:
> For some reason, the attachments got lost. Could you please
> provide them?
> Thanks, Paolo.
>
>
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&p
r=5629