从boa抄的,以飨各位: /* belongs in utility.c */ char *simple_itoa(unsigned int i) { /* 21 digits plus null terminator, good for 64-bit or smaller ints */ static char local[22]; char *p = &local[21]; *p-- = '/0'; do { *p-- = '0' + i % 10; i /= 10; } while (i > 0); return p + 1; }