如何打印uint64_t的数据

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/xiaomei2010280/article/details/79745304

stm32芯片使用SDK5.1编程时遇到需要将uint64_t数据以字符串形式显示出来的问题,经查阅,使用下述语句可以实现需求:

sprintf(buf, "%llu",WebSource_Addr);//WebSource_Addr为uint64_t 类型,buf定义为char buf[20]


注:stm32芯片为32位,使用%llu;64位的使用%lu就行

如何打印uint64_t的数据

猜你喜欢

转载自blog.csdn.net/xiaomei2010280/article/details/79745304