#include<stdio.h>
int main(int argc, char **argv)
{
char *p1;
typeof(*p1) ch = 'c';
printf("ch = %c\n", ch);
return 0;
}
typeof(*p1)相当于一个类型,此处相当于char。
有点类似于c++的auto和decltype…
#include<stdio.h>
int main(int argc, char **argv)
{
char *p1;
typeof(*p1) ch = 'c';
printf("ch = %c\n", ch);
return 0;
}
typeof(*p1)相当于一个类型,此处相当于char。
有点类似于c++的auto和decltype…