CString str = "123,456,789";CString output = "";for (int i=0; i<3; i++){AfxExtractSubString(output, str, i, ',');AfxMessageBox(output);}参数1:用来存放你取出的子串参数2:要拆分的整个字符串参数3:你要取的子字符串位置,从0开始参数4:特定字符