c语言特殊语法(一)结构体赋值 
c语言特殊语法(二)调试 
c语言特殊语法(三)字节对齐
c语言特殊语法(四)位域
c语言特殊语法(五) __attribute__机制介绍 
c语言特殊语法(六)typeof的用法 







typeof是获取变量的类型。
具体使用看看下面的代码你就懂了。


#include

struct _struct_t
{
}struct_t;

void fun()
{
    printf("OK\n");
}


int main(int argc,char *argv[])
{
    int a;
    char b;
    void (*p)(void);

    typeof(a) aa;
    typeof(b) bb;
    typeof(p) pp;
    typeof(struct_t) struct_tt;

    pp = &fun;
    pp();

    return 0;
}
c语言特殊语法(一)结构体赋值 
c语言特殊语法(二)调试 
c语言特殊语法(三)字节对齐
c语言特殊语法(四)位域
c语言特殊语法(五) __attribute__机制介绍 
c语言特殊语法(六)typeof的用法 




09-04 18:26
查看更多