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);

相关文章:

  • 2021-11-14
  • 2021-11-27
  • 2021-11-19
  • 2021-06-20
  • 2021-10-29
  • 2022-02-09
猜你喜欢
  • 2022-01-25
  • 2021-07-04
  • 2021-12-08
  • 2022-03-02
  • 2021-11-29
  • 2022-03-04
  • 2021-05-29
相关资源
相似解决方案