1
2struct Rectangle {
3 int width; // member variable
4 int height; // member variable
5
6 // C++ constructors
7 Rectangle()
8 {
9 width = 1;
10 height = 1;
11 }
12
13 Rectangle( int width_ )
14 {
15 width = width_;
16 height = width_ ;
17 }
18
19 Rectangle( int width_ , int height_ )
20 {
21 width = width_;
22 height = height_;
23 }
24 // ...
25};
26
27