A: 

a++ alone would suffice, without the assignment. The ++ operator acts on its operand "on the spot", meaning you don't need to do any assigning. And a = a++ is undefined behavior, so you don't want to do that.

Try:

Class test
{
public:
   int a=10;
   void operator ++(int)
   {
      a++;
      cout<<a;
   }
}
musicfreak
`a=a++` is not equivalent to `a=a`; the former results in undefined behavior while the latter does not. See the linked duplicate question for details.
James McNellis
@James McNellis: Regardless, I answered the question with my first sentence. Fixed, though.
musicfreak