ISO C++ ambiguous error

String.h has the following operator overloading function which is an user defined

//declaration
int operator==(char *ch)
//definition
int String::operator==(char *ch)
{
        if (strcmp(_text, ch) == 0)
        {
                return TRUE;
        }
        else
        {
                return FALSE;
        }
}

The above operator overloading function is called in the file Sample.c The g++ compiler throws the following error.

String.h:67: note: candidate 1: int String::operator==(char*)
Sample.c:230: note: candidate 2: operator==(const char*, const char*) <built-in>
Sample.c:249: error: ISO C++ says that these are ambiguous, even though the worst conversion for the first is better than the worst conversion for the second:

i have pasted the caller code (sample.c)

230  if (String(StrInputBuffer.part_string(4)) == ":86:")
     {
       //statement
     }
249  else if (String(StrInputBuffer.part_string(1)) == ":")
     {
     }

I used the below gnu command to compile the source file

>g++ -c -g Sample.c -o sample 

compiler version:
Target: x86_64-redhat-linux
gcc version 4.1.2 20080704 (Red Hat 4.1.2-54)
Could you please help me to resolve the issue?

Thanks for looking into this

The string class already has an operator for ==, which is why it is ambiguous.

Yes the string class has overloaded assignment operator function,thats why it throws an error .Is it possible to use g++ compiler option to deselect the in built function ,so that the user defined function can be used

Finally thought of an answer for this.

I don't think you can overload string's operator, but you can derive your own mystring class from std::string, and overload its == operator.

Can you override binary infix operator == with one argument?

RWBoolean
operator==(const RWCString&, const char*     );
RWBoolean
operator==(const char*,      const RWCString&);
RWBoolean
operator==(const RWCString&, const RWCString&);

RWCString