//program to overload increment operator using member function
#include<iostream>
using namespace std;
class A
{
int x;
public:
A()
{
cout<<"ENTER ANY VALUE";
cin>>x;
}
void operator ++()
{
x++;
cout<<"INCREMENTED VALUE "<<x;
}
};
main()
{
A s;
++s;
}
Also see program to print text in green CLICK HERE