CString str[10];
DWORD nub = 0;
DWORD nFind = 0;
while(s.GetLength())
{
nFind = s.Find(_T(" "));
str[nub] = s.Left(nFind);
s = s.Right(s.GetLength() - nFind -1 );
s = s.TrimLeft(_T(" "));
nub++;
}
//nub 记录个数.
DWORD datanub = nub;
//数据存于str[]中
DWORD b[10] = {0};
unsigned char a[10] = {0};
for(int i = 0; i< datanub; i++ )
{
b[i] = _ttoi(str[i]);
a[i] = b[i];
}
版权声明:本文为博主原创文章,未经博主允许不得转载。