正在加载图片...
void maino student tom, jack(15); cout<≤<” Tom is“<< tom GetAge0<<” years old.”<<endl; cout<<” Jack is“< jack GetAge0<<” years old.”<endl; Default Constructor called Constructor called Tom is 0 years old Jack is 15 years old Destructor called Destructor calledvoid main() { student tom,jack(15); cout<<”Tom is “ <<tom.GetAge()<<”years old.”<<endl; cout<<”Jack is “<jack.GetAge()<<”years old.”<<endl; } Default Constructor called. Constructor called. Tom is 0 years old. Jack is 15 years old Destructor called Destructor called
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有