我的指针遇到了一些问题
void getPartOfString(const TCHAR * wholeString)
{
const TCHAR * pPointer = NULL;
pPointer = _tcsstr(wholeString, searchedString); //searching for a special string in string
pPointer += _tcslen(searchedString); //set pointer to the beginning of the string wanted
//here I want to check if the char, the pointer points to is a space and if it is set it forward
}
Run Code Online (Sandbox Code Playgroud)
那么,我怎么能摆脱这个空间呢?
如果我正确理解了这个问题:
if (*pPointer == _T(' '))
++pPointer;
Run Code Online (Sandbox Code Playgroud)
所述_T宏可确保结果的类型的始终TCHAR,是否TCHAR被定义为char(ANSI)或wchar_t(Unicode)的.
| 归档时间: |
|
| 查看次数: |
874 次 |
| 最近记录: |