If we have a class like this:
Can define a function that can cast an object of the class myClass to a char *, so that if we canm write the following:Code:class myClass{ public: myClass(); ~myClass(); private: char *myString; };
If I can do this, can you tell me how?Code:myClass object1; cout << object1; //so this makes the casting.
Thanks is advance.