This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
std::ofstream
- To: libstdc++ at gcc dot gnu dot org
- Subject: std::ofstream
- From: Dean Hoover <dhoover at rochester dot rr dot com>
- Date: Wed, 18 Jul 2001 14:19:07 -0400
- Reply-To: dhoover at acm dot org
I am using gcc-3.0 and the following fails to
compile, which I believe should be OK. I
lifted the line in question from page 632 of
Josuttis.
#include <iostream>
int main()
{
std::ofstream file("xyz.out", std::ios::out|std::ios::app);
}
The errors from the compiler were:
g++ foobar.cc -o foobar
foobar.cc: In function `int main()':
foobar.cc:5: variable `std::ofstream file' has initializer but
incomplete type
make: *** [foobar] Error 1
Am I in error somewhere?
Thanks.
Dean Hoover