VisualC ++ 6.0 z unsigned long long i sprintf

Chcę sprintf () długą wartość unsigned long w Visual C ++ 6.0 (plain C).

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);

daje wynik

12345678, (null), test1

(Obejrzyj totest2 nie jest drukowane)

il = 123456789012345 daje uchwyt wyjątku

jakieś sugestie?

questionAnswers(3)

yourAnswerToTheQuestion