观 观雨 Unregistered / Unconfirmed GUEST, unregistred user! 2004-06-09 #1 请问在VC中如何把CString类型转换为整形?如果CString中保存的是十六进制的字符串如何转换为整形?(要用MFC提供的函数).如果用标准C++函数如何吧String转换成相应的int类型?
X XWHope Unregistered / Unconfirmed GUEST, unregistred user! 2004-06-09 #2 strcpy(temp,"123"); 短整型(int) i = atoi(temp); 长整型(long) l = atol(temp); 浮点(double) d = atof(temp);