File Stream Open Problem with g++ 3.3.3 and libstdc++.so.5
Mon Mar 29 10:26:00 GMT 2004
As per your suggession, I used "ofstream" instead of "ifstream"
in my code, but unfortunately, the result was same before, after
254 successful streams openning, assertion occured, but I am
supposed to open 1000 streams to the same file "boo".
NOTE: I have one existing file named "boo" in the same directory of a.out.
My Code :
const int MAX_STREAM = 1000;
using namespace std;
int main(int argc, char* argv)
for ( int i=0; i != MAX_STREAM; i++ )
cout << "i : " << i << endl;
Please let me know your opinion.
With Very Best Regards
From: Paolo Carlini [mailto:firstname.lastname@example.org]
Sent: Monday, March 29, 2004 5:49 PM
To: Subrata Basak
Subject: Re: File Stream Open Problem with g++ 3.3.3 and libstdc++.so.5
according to the ISO standard, now closely tracked, the default
open mode of ifstream is "in", the equivalent of C "r", therefore
_file must exist_: indeed, changing your snippet to use ofstream
leads to the expected behavior.
P.S. gcc-help is much more suited for this kind of doubts.
More information about the Libstdc++