I want to overload the '=' operator so that I can assign a String
object to char*. I am using a friend function.
I'm not sure on how to do this but here's my code:
Code:
class String
{
public:
String();
String(String&);
String(char*);
virtual ~String();
String& operator =(const String&);
String& operator =(const char*);
friend char* operator=(char*,String&);
//.....
//.....
private:
char *lpzstr;
};
I get an error that says:
'operator =' must be a <Unknown> member
What does this mean AND/OR how would I go about
accomplishing this task?