typedef重新定義類型

typedef重新定義類型

重新定義類型

重新定義類型int32_t是int

typedef int int32_t;

使用方法

1
2
int32_t k = 10;
printf("%d\n",sizeof(k));

執行結果

4

重新定義類型int64_t為long long

typedef long long int64_t;

使用方法

int64_t m = 10;
printf("%d\n",sizeof(m));

results matching ""

    No results matching ""