将下列程序中的友元改成普通函数, 为此应增加类中访问私有数据的成员函数:
//===================================
//ex0807 . cpp
//===================================
class Animal{
int itsWeight;
int itsAge;
friend void setValue(Animal&, int, int);
};//----------------------------------- void setValue(Animal& ta, int tw, int tn){ ta.itsWeight = tw; ta.itsAge = tn; }//---------------------------------- int main() { Animal peppy; setValue(pappy, 7, 9); }//==================================