Hi, I was trying to implement CString with std::string and std::wstring.
class CString
{
public:
std::string str;
CString() {str = "ABCD";} //this works
}:
class CString
{
public:
std::wstring wstr;
CString() {wstr = "ABCD";} //this doesn't works
}:
The wstring is giving error for =operator. What do I need to add here for wstring?
I am using MS visual studio 2005, but I want to make it compiler independent.
class CString
{
public:
std::string str;
CString() {str = "ABCD";} //this works
}:
class CString
{
public:
std::wstring wstr;
CString() {wstr = "ABCD";} //this doesn't works
}:
The wstring is giving error for =operator. What do I need to add here for wstring?
I am using MS visual studio 2005, but I want to make it compiler independent.
Comment