sscanf 格式化给变量赋值
char cBuff[100] = "0,1,1.1,2.2,3.3,444444!@#¥%……"; int i1, i2; float f1, f2, f3; sscanf(cBuff, "%d,%d,%f,%f,%f", &i1, &i2, &f1, &f2, &f3); CString strMsg; strMsg.Format(_T("%d %d %02f %f %f"), i1, i2, f1, f2, f3); AfxMessageBox(strMsg);//0 1 1.100000 2.200000 3.300000
以逗号隔开,后面的可以作废