This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: libstdc++/5629: fstream class is unable to create file in a read/write mode


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]