I'm trying to split a WideChar String in to an array, Here is the way I'm doing this :<>
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]);
}
The problem is I do not have "This" in my final result array
Whats wrong ?
 
     
    