void freeobj(mycoach &t)
{
if (t.age < 16)
{
cout <<"精神可嘉~但还是年龄太小" <<endl;
throw t.age;
}
if (t.months <= 12)
{
cout << "精神可嘉~再练一段时间,加油" << endl;
throw t.months;
}
//throw t;
}
void freeobj(mycoach &t) throw(int, char,char*)
{
if (t.age < 16)
{
cout <<"精神可嘉~但还是年龄太小" <<endl;
throw t.age;
}
if (t.months <= 12)
{
cout << "精神可嘉~再练一段时间,加油" << endl;
throw t.months;
}
//throw t;
}
void freeobj(mycoach &t) throw()
{
if (t.age < 16)
{
cout <<"精神可嘉~但还是年龄太小" <<endl;
throw t.age;
}
if (t.months <= 12)
{
cout << "精神可嘉~再练一段时间,加油" << endl;
throw t.months;
}
//throw t;
}