class increment
{
private:
int num;
public:
void getnumber()
{
cout<< "Enter a number: ";
cin>> num;
}
void display()
{
cout<< "Number = " <<num;
}
void operator ++()
{
// used for prefix
++num;
}
void operator ++(int)
{
// used for postfix
num++;
}
};