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: bjorn rohde jensen <bjensen at fastmail dot fm>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Mon, 20 Jan 2003 16:31:04 -0500
- Subject: Re: cerr not defined
- Reply-to: shane at shaneroberts dot com
Bjorn,
thank you, things are beginning to become clear.
It would appear that there was an error in the Stroustrup book
where "std::" was left off "cerr" so that it should have been:
std::cerr << P << ' ' << P2 << '\n';
for emitting the error message.
This would have placed cerr in the std namespace which is
where<fstream> places it as opposed to <fstream.h>.
Since I am new to g++ and C++ can anyone clue me into when
C++ standards changed, and g++ header files were
relocated/changed?
I just need to get my bearings so I know how to distinquish between
"old" and "new".
Thanks,
Shane
On 20 Jan 2003 at 22:17, bjorn rohde jensen wrote:
> Hi Shane,
>
> You are not actually using
>
> #include<fstream.h>
>
> but
>
> #include<fstream>
>
> The former usually populates the global
> namespace, but the later uses namespace std.
>
> Yours sincerely,
>
> Bjorn
>