This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
FSTREAM and VECTOR
- To: libstdc++ at gcc dot gnu dot org
- Subject: FSTREAM and VECTOR
- From: Trond Bo <trond dot bo at dnmi dot no>
- Date: Sun, 07 Jan 2001 20:16:12 +0000
I tried the two following examples on snapshot
gcc-20001225. Example number one got compiled.
and it did run with the expected result.
Example number did not compile.
The difference is simply where I choose to place
fstream.
Is there something I do wrong or should it be
reported as a bug ?
// -------------------------------------------------
// Example number one
//
#include <fstream>
#include <vector>
using namespace std;
main() { vector<double> i;
i.push_back( 0.01 );
ofstream outfile( "./fil.out", ios::out );
outfile << ( 0.10 + (*(i.begin())) ) << endl;
}
// -------------------------------------------------
// Example number two
//
#include <vector>
#include <fstream>
using namespace std;
main() { vector<double> i;
i.push_back( 0.01 );
ofstream outfile( "./fil.out", ios::out );
outfile << ( 0.10 + (*(i.begin())) ) << endl;
}