Assignment 1 errors Continued

So know its saying:

console.h:23:11: error:   initializing argument 2 of âcio::Console& cio::operator<<(cio::Console&, char)â [-fpermissive]
cio_test.cpp:129:16: error: invalid conversion from âconst char*â to âcharâ [-fpermissive]

In the .h file I am declaring them like this:

namespace cio{

class Console: public BConsole{

//Stuff

};

 

 Console& operator>>(Console& cn, const char* ch);
 Console& operator>>(Console& cn, int& ch);
 Console& operator<<(Console& cn, char ch);

}

What Am I doing wrong, is it the way I declared them, or something else?

This entry was posted in Uncategorized and tagged . Bookmark the permalink.

2 Responses to Assignment 1 errors Continued

  1. Thanushaa says:

    Should be:
    Console& operator<<(Console& cn, const char* str);

Leave a comment