nPos=strInfo.Find(strSperator1,0);
strA_ij=strInfo.Left(nPos);
strA_ij.TrimLeft();
strA_ij.TrimRight();
nNum=atoi(strA_ij);
pData[i*nCol +j]=nNum;

strInfo.Delete(0, nPos+1);strInfo.TrimLeft();详细解释下以上这段代码每一句的意思 谢谢

解决方案 »

  1.   

    请翻到MSDN CString类的对应函数处查看每个函数的作用,谢谢!
      

  2.   

    就是CString的一些成员函数的使用,MSDM都有
      

  3.   

    http://msdn.microsoft.com/en-us/library/ms174288.aspxhttp://msdn.microsoft.com/en-us/library/abzc9989.aspx
      

  4.   

    nPos=strInfo.Find(strSperator1,0);         在strInfo中从0位置开始查找strInfostrSperator1 找到的位置是nPos
    strA_ij=strInfo.Left(nPos);                取得nPos左边的字符 存入strA_ij
    strA_ij.TrimLeft();                        去除strA_ij左边的空格 回车 TAB
    strA_ij.TrimRight();                       去除strA_ij右边的空格 回车 TAB
    nNum=atoi(strA_ij);                        将strA_ij转成数字
    pData[i*nCol +j]=nNum;                     将数字存入pData中strInfo.Delete(0, nPos+1);                 删除strInfo中strA_ij字符strInfo.TrimLeft();                        去除strInfo左边的空格 回车 TAB
      

  5.   

    建议楼主自己查看MSDN,详细,全面。