Home > Software engineering >  MFC on cstrings processing
MFC on cstrings processing

Time:02-27

Cstrings CAutoUpdataDlg: : ReturnPath ()

{
CString sPath;
GetModuleFileName (NULL, sPath GetBufferSetLength (MAX_PATH + 1), MAX_PATH);
SPath. ReleaseBuffer ();
Int nPos.
NPos=sPath. ReverseFind (' \ \ ');
SPath=sPath. Left (nPos);
Return sPath;
}

Get sPath content is: C: \ Users \ Administrator;
I want to turn the contents of the sPath into: c: \ \ Users/Administrator;
Need to how to operate, use Pointers to operate?

CodePudding user response:

Use the find to find, and then setat
  • Related