Cerr Is Producing A Type Error In A Program.

Q11. If a reference to cerr is producing a type error in a program, what could be the possible reason? How can this error be removed?

Ans. The possible reason for this error could be that the header file iostream.h has not been included in the program. Because the declarations of the predefined stream objects are contained in the files iostream.h.

To remove this error, the first line of the program should contain #include<iostream.h>, so that the I/O library iostream.h can be included.

Leave a Reply

Your email address will not be published. Required fields are marked *

%d bloggers like this: