重载后增量运算符时,为什么要加一个int的参数,以前定义的函数中没见过这样加的
#include<iostream>using namespace std;class A{public: A(int i) { this->i=i; } A & operator++() { ++i; return *this; } A operator++(int) //重载后增量运算符时,为什么要加一个int的参数,以前定义的函数中没见过这样加的 { A temp=(*this); i++; return temp; } void display() { cout<<i<<endl; }private: int i;};void main(){ A a(100); a.display();}