比如我一个表示当天时间的字符串,如 23:08:48但是我显示出来是23:8:48如何改过来?
用Format的%02d来格式化字符串
int h=23;int m=8;int s=48;CString str;str.Format("%2d:%2d%2d", h, m, s);