类型为uint64_t的变量,使用printf进行打印时,需要区分操作系统:
64位系统:使用%ld
32位系统:使用%llu


#include<stdio.h>
#include <iostream>

int64_t a = 9102928374747474;

int main(void) {
    std::cout << a << std::endl;

    printf("%lld\n", a);  
}

 

相关文章:

  • 2022-12-23
  • 2021-07-11
  • 2022-12-23
  • 2022-12-23
  • 2021-09-09
  • 2021-09-08
  • 2021-07-27
  • 2021-06-16
猜你喜欢
  • 2021-07-27
  • 2021-10-10
  • 2021-11-28
  • 2021-12-28
  • 2021-08-28
  • 2021-10-20
相关资源
相似解决方案