概述
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所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复