This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: cerr not defined


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
> 
> 



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]