954,500 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

the object has cv-qualifiers that are not compatible with the member function

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...

didierdrogba
Newbie Poster
1 post since Sep 2007
Reputation Points: 10
Solved Threads: 0
 

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.

Salem
Posting Sage
Team Colleague
11,531 posts since Dec 2005
Reputation Points: 5,862
Solved Threads: 953
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You