int t=10; char str1[5]; sprintf(str1,"%#04x",t);//#表示添加0x,0表示补0,4表示补足4位
躲猫猫社团团长 http://t.sina.com.cn/coolria