1 #include <stdio.h>
 2 #include <stdlib.h>
 3 
 4 #define INT int
 5 typedef short SHORT;//看此处有没有分号
 6 
 7 //这说明两者没有什么区别 但是如果定义稍微复杂点的别名#define 将会出现问题 看下面程序
 8 int main1(void)
 9 {
10     INT a = 2;//此时的INT就是int
11     SHORT b = 9;
12     printf("a=%d\nb=%d\n",a,b);
13 
14     
15 
16     system("pause");
17     return 0;
18 }

 

相关文章:

  • 2022-02-20
  • 2021-06-15
  • 2022-01-15
  • 2022-12-23
  • 2021-12-07
  • 2021-08-10
  • 2021-07-27
  • 2022-12-23
猜你喜欢
  • 2021-05-22
  • 2022-12-23
  • 2021-10-06
  • 2022-12-23
  • 2021-06-05
  • 2021-06-01
  • 2021-12-13
相关资源
相似解决方案