#include<iostream>
using namespace std;

class Counter{
  private:
    unsigned int count;   //count
  public:
    Counter() : count(0)        //constructor
    {  }
    Counter(int c): count(c)
    {  }
    unsigned int get_count() //return count
    { return count; }
    Counter operator ++ (){    //increment (prefix)
     ++count; 	  
     return Counter(count);              
   }
};

main(){
  /*int x=10, y;
  y = x++;
  cout<<"x = "<<x<<", "<<"y = "<<y<<endl;     
    */   
     
  Counter c1, c2; 
  cout << "\nc1=" << c1.get_count(); 
  cout << "\nc2=" << c2.get_count();
  ++c1; 
  c2 = ++c1; 
  cout << "\nc1=" << c1.get_count(); 
  cout << "\nc2=" << c2.get_count() << endl;
  system("pause");
}
