Input
Output
#include <iostream> using namespace std; class Rectangle{ static int c;// static member data public: void get_data() { c++; } static int show_data() // static member function { return c; } }; int Rectangle::c;// initialized to zero int main(){ Rectangle r1; Rectangle r2; r1.get_data(); r2.get_data(); cout << "Final Stage Count: " << Rectangle::show_data() << endl; return 0; }