hi all,

I'm developing my own string class. In my class, I've overloaded = operator 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;
But in my test project, I receive compile error like below.

illegal implicit conversion from 'char *' to CString*
Any help will be appreciated.
Regards.