#include<iostream>
using namespace std;
class box
{
public:
box(int h=10,int w=11);
~box(){cout<<"hello"<<endl;}
int volume();
private:
int height;
int wight;
};
box::box(int h,int w)
{
height=h;
wight=w;
}
int box::volume()
{
return height*wight;
}
int main()
{
box a[3]={
box(1,1),
box(1,2),
box(1,3)};
cout<<a[0].volume()<<endl;
cout<<a[1].volume()<<endl;
cout<<a[2].volume()<<endl;
return 0;
}
using namespace std;
class box
{
public:
box(int h=10,int w=11);
~box(){cout<<"hello"<<endl;}
int volume();
private:
int height;
int wight;
};
box::box(int h,int w)
{
height=h;
wight=w;
}
int box::volume()
{
return height*wight;
}
int main()
{
box a[3]={
box(1,1),
box(1,2),
box(1,3)};
cout<<a[0].volume()<<endl;
cout<<a[1].volume()<<endl;
cout<<a[2].volume()<<endl;
return 0;
}