1.
#include <iostream>
using namespace std;
int main()
{
int i = 0;
int j = 0;
if(i ++ == ++ j)
{
cout << "i," << i << "j," << j << endl;
}
else
{
cout << "不相等" << endl;
cout << "i," << i << "j," << j << endl;
}
return 0;
}
2. 宏定义实现求数组个数
#define SIZE_ARRAY(a) (sizeof(a)/sizeof(a[0]))
int a[10] = {1,2,3,4,5,6,7,8,9,0};
int k = SIZE_ARRAY(a);