宏定义 #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));
#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));