我是靠谱客的博主 炙热火,这篇文章主要介绍C++打印size_t和ssize_t和int64_t和uint64_t,现在分享给大家,希望可以做个参考。

1.代码示例  

1.main.c
//定义:typedef unsigned int size_t;       
       typedef unsigned int uint32_t;
       typedef signed   int ssize_t;

int main(){
  size_t a;
  ssize_t b; 
  int64_t c;
  uint64_t d;
  unint32_t e;

  printf("a = %zu n", a);  // size_t   <----> unsigned int
  printf("a = %zu n", e);  // uint32_t <----> unsigned int
  printf("b = %zd n", b);  // ssize_t  <--->  signed int 
  printf("c = %jd n", c);  // int64_t  <--->  long long   
  printf("d = %ju n", d;   // uint64_t <--->  unsigned long long
}

*********************************************************
typedef signed char        int8_t;
typedef short              int16_t;
typedef int                int32_t;
typedef long long          int64_t;
 
/*Unsigned*/
typedef unsigned char      uint8_t;
typedef unsigned short     uint16_t;
typedef unsigned int       uint32_t;
typedef unsigned long long uint64_t;
*********************************************************

最后

以上就是炙热火最近收集整理的关于C++打印size_t和ssize_t和int64_t和uint64_t的全部内容,更多相关C++打印size_t和ssize_t和int64_t和uint64_t内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(116)

评论列表共有 0 条评论

立即
投稿
返回
顶部