// 给你写段代码:
CString str="aa,bb,cc,dd,ee";
CString strTemp;
int nIndex=0, nLast=0;
while (nIndex != -1)
{
nIndex = str.Find(",", nLast);
if(nIndex != -1)
{
strTemp = str.Mid(nLast, nIndex - nLast);
nLast = nIndex + 1;
}
else
{
strTemp = str.Mid(nLast, str.GetLength() - nLast);
}
TRACE0(strTemp);
};