i am trying to overload the + operator due to this error:
tools.cpp(147) : error C2679: binary '+' : no operator found which takes a right-hand operand of type 'CSchemaString' (or there is no acceptable conversion)
The code is:
// I TRIED THIS TO OVERLOAD + OPERATOR
CSchemaString operator +(const CVisuComm& CVisuComm::TabCCUImess,
const CSchemaString& GetPriority);
//THE CODE AT WHICH THE ERROR IS RETURNED,
//error C2679: binary '+' : no operator found which takes
//a right-hand operand of type
//'CSchemaString' (or there is no acceptable conversion)
CVisuComm::TabCCUImess[CVisuComm::nbCCUImess++]=
"RECONFIGURATION SOLUTION N° " +config.GetPriority();
//THE VARIOUS TYPES ARE
//CVisuComm-------class CVisuComm
//TabCCUImess-----static CString
//nbCCUImess------static int nbCCUImess
//config----------CConfig_State_ChangeType
//GetPriority-----CSchemaString
but it throws the same error along with
error C2751: 'CVisuComm::TabCCUImess' : the name of a function parameter cannot be qualified
So please suggest the correct way to overload the operator. Any help is appreciated.