char strTtimeDump[512] = ""; int a = 5; sprintf(strTtimeDump, "%.4d", a); //strTtimeDump输出0005 数字前补3个0 sprintf(strTtimeDump, "%4d", a); //strTtimeDump输出 5 数字前补3个空格
char strTtimeDump[512] = ""; int a = 5; sprintf(strTtimeDump, "%.4d", a); //strTtimeDump输出0005 数字前补3个0 sprintf(strTtimeDump, "%4d", a); //strTtimeDump输出 5 数字前补3个空格