I have created a class for which I would like to overload the == operator. The name of the class is String. The problem I am running into comes into play when the object is a pointer..

String *a = new String();

if (a == "") return true; //error in VC++

the following operators are defined in the string class..

class String
{
bool operator ==(char *);
friend bool operator==(String &, char *);
}

I tried adding:
friend bool operator==(String *, char *);

but I get a compiler error.. What to do?