如何使用printf系列可移植地打印size_t变量?
size_tprintf()
%ug++ -g -W -Wall -Werror -ansi -pedantic
size_t x = <something>;printf( "size = %u\n", x );warning: format '%u' expects type 'unsigned int', but argument 2 has type 'long unsigned int'
%lu.
unsigned long%lu
汪汪一只猫
相关分类