Which character should be used for ptrdiff_t
in printf
?
Does C standard clearly explains how to print ptrdiff_t
in printf
? I haven't found any one.
int a = 1;
int b = 2;
int* pa = &a;
int* pb = &b;
ptrdiff_t diff = b - a;
printf("diff = %?", diff); // % what?
Question&Answers:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…