I have a string class that overloads the const char* operator as
follows:
mystring::opera tor const char* () const
{
return this->c_str();
}
I have another class the overloads one of is functions as follows:
void myclass::func(m ystring& x)
{
// do something
}
void myclass::func(c onst char* x)
{
func(mystring(x ));
}
With VC6 the 2nd func() calls the first func(), but with VC7 it calls
itself. Any ideas why this is and which compiler is correct?
follows:
mystring::opera tor const char* () const
{
return this->c_str();
}
I have another class the overloads one of is functions as follows:
void myclass::func(m ystring& x)
{
// do something
}
void myclass::func(c onst char* x)
{
func(mystring(x ));
}
With VC6 the 2nd func() calls the first func(), but with VC7 it calls
itself. Any ideas why this is and which compiler is correct?