hi all,
I'm developing my own string class. In my class, I've overloaded = operator like below.
But in my test project, I receive compile error like below.String.h
CString& operator=(const char* aStr);
String.cpp
CString& CString:perator=(const char* aStr)
{
if (iStrData) delete iStrData;
iStrData = HBufC16::NewL(STRLEN(aStr));
iStrData->Des().Append(*aStr);
// Return myself
return *this;
}
test.cpp
CString* str = CString::NewL();
char* s = "erdi";
str = s;
Any help will be appreciated.illegal implicit conversion from 'char *' to CString*
Regards.

perator=(const char* aStr)
Reply With Quote

