我们指定++i和i++是有区别的
#include<iostream>
using namespace std;
int main()
{
int a = 0;
int b = 0;
int c = ++a;
int d = b++;
cout << "c = " << c << endl;
cout << "d = " << d << endl;
return 0;
}
输出结果:
c=1
d=0
那么++i和i++哪个更高效呢?