//本程序示范建立类和使用类
//Used to calculate the area of rectangle
#include <iostream.h>
class app
{
public: //Declare member variable and functions as public so other
//functions can use it
int height;
int width;
int area (height, width);
};
int app::area (height,width) //function definition, class::funtion
{
return (height*width);
}
int main()
{
app a;
cout<<a.area(5,10);
return 0;
}