#define宏定义只是用于简单的替换 #defineint_ptr int *int_ptr chalk, cheese;int* chalk, cheese;//展开之后,chalk是指针变量,cheese是整型变量typedefint*int_ptr; int_ptr chalk, cheese;//chalk和cheese均为整型指针变量
宏定义 #define与typedef的区别。 #include <stdio.h> #define TP1 char* typedef char* TP2; int main(void) { TP1 a,b; TP2 x,y; printf("a=>%d,b=>%d\n",sizeof(a),sizeof(b)); printf("x=>%d,y=>%d\n",sizeof(x),sizeof(y));...