A simple question of fstream
Ajay Bansal
Ajay_Bansal@infosys.com
Thu Jan 30 13:00:00 GMT 2003
Still doesn't work with gcc 3.2.1, RH73
-----Original Message-----
From: John Love-Jensen [mailto:eljay@adobe.com]
Sent: Thursday, January 30, 2003 6:19 PM
To: Ajay Bansal; gcc-help@gcc.gnu.org
Subject: Re: A simple question of fstream
Hi Ajay,
I modified your example (see below), and it works for me (GCC 3.1 on OS
X).
Sincerely,
--Eljay
#include <fstream>
#include <iostream>
#include <cstdlib>
#include <cerrno>
using namespace std;
int main()
{
fstream iostrm;
iostrm.open("new1.txt", ios_base::out | ios_base::in);
cout << errno;
iostrm.write("gagan", 5);
iostrm.close();
return 1;
}
More information about the Gcc-help
mailing list