This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: cerr not defined
- From: shane at shaneroberts dot com
- To: John Love-Jensen <eljay at adobe dot com>, <shane at shaneroberts dot com>, <gcc-help at gcc dot gnu dot org>
- Date: Mon, 20 Jan 2003 15:57:42 -0500
- Subject: Re: cerr not defined
- References: <3E2C1136.19539.200B702F@localhost>
- Reply-to: shane at shaneroberts dot com
Eljay and Oliver,
thank you for responding to my cerr problem.
Eljay,
the original code I got the "ios undefined error" in was:
std ios::in
I fixed it by changing it to:
std::ios::in
the error was not mine but in the book. I am learning C++ so I did
not recognize the error.
Oliver,
the example I gave with the "cerr undeclared" error is directly from
the Strousstrup book. Since he designed C++ I assumed his code
would be correct. Apparently I was wrong, since I fixed it by
changing it to std::cerr as you suggested.
I am still using the <fstream.h> include though, so I guess cerr
does come with fstream.
Shane
On 20 Jan 2003 at 14:29, John Love-Jensen wrote:
> Hi Shane,
>
> What Oliver said is good to note.
>
> Plus, did you mean "ios" or "ios_base"?
>
> --Eljay
>
>