因为今天用到字符串分割的问题,把算法做个记录
CString str="what you should do?MFC?Today";
我想得到3个字符串what you should do,MFC,Today
int index=str.Find('?');
CString subStr1=str.Left(index);
str=str.Right(str.GetLength()-index-1);
这样subStr1就是what you should do
str就变为MFC?Today可以用循环得到这三个字符