Tag: vc6

带有unsigned long long和sprintf的VisualC ++ 6.0

我想在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它给出了一个exception句柄 有什么建议?