C++中将字符串转换为字符串数组
比如CString='i see dead peole',将其转换为
s[0]=i
s[1]=see
s[2]=dead
s[3]=people
[解决办法]
完蛋..
代码写错了..!
----
CString str = "Hello World";
CString ptr[100];
int i = 0;
while(TRUE)
{
int index = str.Find(' ');
if (index == -1)
{
ptr[i] = str;
break;
}
ptr[i] = str.Left(index);
str = str.Right(str.GetLength() - index - 1);
i++;
}