I have a function prototype inside a public class access specifier. This is the prototype:
friend void operator=(String &s,char *str);
The String is the class where it's prototyped. As you can see it's a friend function. By keeping it this way it gives me this error:
operator =' must be a non-static member // Error: operator= must be a member function
And when I remove the friend property it gives me this error:
error C2804: binary 'operator =' has too many parameters
What's wrong with this prototype? There's no call at operator= function currently, so there shouldn't be any error even without the function definition.