I was looking at one of the implementation of String class and noticed the following overloaded == operator.
String f = "something";
String g = "somethingelse";
if (f == g)
cout << "Strings are equal." << endl;
bool operator==(String sString)
{
return strcmp(operator const char*(), (const char*)sString) == 0;
}
I understood most of the part except operator const char*()
what exactly its been used for?
I have very basic knowledge of operator overloading , can someone please throw some more light on this?