This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: std::ofstream
- To: dhoover at acm dot org
- Subject: Re: std::ofstream
- From: Benjamin Kosnik <bkoz at redhat dot com>
- Date: Wed, 18 Jul 2001 11:26:05 -0700 (PDT)
- cc: libstdc++ at gcc dot gnu dot org
> #include <iostream>
>
> int main()
> {
> std::ofstream file("xyz.out", std::ios::out|std::ios::app);
> }
> Am I in error somewhere?
Yes: std::ofstream is in <fstream>. You'll need to include that file.
-benjamin