To fix the error:
in WCS_String you need to declare: friendchar* operator+(char* lhs, WCS_String& rhs);
Then you need a non-member function:
1 2 3
char* operator+(char* lhs, WCS_String& rhs)
In this function you need to manually append your WCS_String to the char* and return a char*.
That will now allow you to have a char* on the left and a WCS_String on the right of a + sign. If you also want to have a WCS_String on the left and a char* on the right, it's a little easier. Just add this to the WCS_String class and manually append a char* to your string.
1 2 3
char* operator+(char* rhs) // *this is the lhs
To fix the warning: for( unsignedchar c = 0; c < strlen(s); c++) if( !std::isdigit(s) )
Last edited on
Topic archived. No new replies allowed.
You are using a version without Ads of this website. Please, consider donating: