// example: class constructor #include using namespace std; class CRectangle { int width, height; public: CRectangle (); int area () {return (width*height);} }; CRectangle::CRectangle () { width = 0; height = 0; } int main () { CRectangle rect; CRectangle rectb; cout << "rect area: " << rect.area() << endl; cout << "rectb area: " << rectb.area() << endl; return 0; }