Hello,

I am trying to migrate my application from an older unix box to the new Hp unix box with Itanium architecture.The problem I am facing is with the different versions of the aC++ compilers installed in the 2 boxes:

older unix machine has : aC++ Version A.03.33

new machine with Itanium architecture has : aC++/C Version A.06.10

Because of this , when I try to compile my code in the new machine, I get the following error:

error #2315: the object has cv-qualifiers that are not compatible with the member function.

Here I have an example for reference:

Function Declaration:

class CandidateSelectObject
{ public: ....
private:int setXMLData(int iCandId) ;
}
typedef set<CandidateSelectObject,CandidateSelectObjectSetSortCriterion> CANDSELECTOBJSET;

Usage:

for (candsRefObjSetIter = candsRefObjSet.begin(); candsRefObjSetIter != candsRefObjSet.end();candsRefObjSetIt
er++)
{
cGrade = candsRefObjSetIter->getGrade();
candsRefObjSetIter->setXMLData(i+1);

blob_ptr = szTmp;
parserObj.createHTMLRespCand(candsRefObjSetIter->getXMLOUTPtr(), blob_ptr); // Currently blob_prt is
not using.

candsRefObjSetIter->printHTMLSubjNmes();
candsRefObjSetIter->printHTMLAdr();
i++;
if ( i == stRules.iCandLimit )
break;
}

It seems like the object is being considered as constant by default by the new compiler, and hence the mismatch between the types of object and the member functions.

Kindly help me with ur suggestions and suiatable work around if any...

Post a small and complete example program which duplicates the problem. You know, a simple class with a couple of members and a simple main to make use of it.

This article has been dead for over six months. Start a new discussion instead.