typedef 为类型取别名

#include <stdio.h>

int main() {
  typedef int myint; // 为int 类型取自己想要的名字
  myint a = 10;
  printf("%d", a);
  return 0;
}


其他类型的用法也是一样的

typedef 类型 自己想要取得名字;

猜你喜欢

转载自www.cnblogs.com/hello-dummy/p/9196812.html