我想在 Visual C++ 6.0(纯 C)中 sprintf() 一个 unsigned long long 值。
char buf[1000]; //bad coding
unsigned __int64 l = 12345678;
char t1[6] = "test1";
char t2[6] = "test2";
sprintf(buf, "%lli, %s, %s", l, t1, t2);
给出结果
12345678, (null), test1
test2
(未打印的手表)
它给出l = 123456789012345
了一个异常句柄
有什么建议么?