这个错误源于粗心。
//give money. the parameters are the other people's id
void GiverManager::give(Giver* oriGiver, unsigned count, ...);//注意这里不能有分号,否则后果不堪设想
{
//decrease giver's money
int money = oriGiver->getMoney();
money -= (money / count);
money = money < 0 ? 0 : money;
oriGiver->setMoney(money);
va_list pArg;
va_start(pArg, count);
for(unsigned i = 0; i < count; i++)
{
unsigned id = va_arg(pArg, unsigned);
Giver *aGiver = this->objectAtIndex[i];
}
va_end(pArg);
}