我正在尝试将 WideChar 字符串拆分为一个数组,这是我这样做的方式:<>
WCHAR* Message = _T("This is a sample text"):
wchar_t *pwc;
CStringArray Command;
pwc = wcstok(Message, L" ");
int Count = 0;
while (pwc != NULL) {
pwc = wcstok(NULL, L" ");
Command.Add(pwc);
Count++;
}
for (int i = 0 ; i <= Count ; i++)
{
AfxMessageBox(Command[i]);
}
问题是我的最终结果数组中没有“This”有
什么问题吗?