Kailric
Jack of All Trades
I created a Function:
And I call the "setExtraBuildingBonus" in this another function something like this:
and get this error:
What can I do for a work around cause I am not understanding consts in functions like this?
Code:
void CvCity::setExtraBuildingBonus(int iValue)
{
m_iExtraBuildingBonus = iValue;
}
And I call the "setExtraBuildingBonus" in this another function something like this:
Code:
void CvCity::calculateNetYields(int aiYields[NUM_YIELD_TYPES], int* aiProducedYields, int* aiConsumedYields, bool bPrintWarning) const
{
setExtraBuildingBonus(10);
....
and get this error:
Code:
CvCity.cpp(4251) : error C2662: 'CvCity::setExtraBuildingBonus' : cannot convert 'this' pointer from 'const CvCity' to 'CvCity &'
What can I do for a work around cause I am not understanding consts in functions like this?