WEB开发网
开发学院软件开发C++ C++中 打印size_t 和 ssize_t 阅读

C++中 打印size_t 和 ssize_t

 2012-06-29 20:57:39 来源:WEB开发网   
核心提示:#Use the z modifier:size_t x;ssize_t y;printf("%zu\n", x); // prints as unsigned decimalprintf("%zx\n", x); // prints as hexprintf("%
#Use the z modifier:

size_t x;
ssize_t y;
printf("%zu\n", x);  // prints as unsigned decimal
printf("%zx\n", x);  // prints as hex
printf("%zd\n", y);  // prints as signed decimal

Tags:打印 size ssize

编辑录入:爽爽 [复制链接] [打 印]
赞助商链接