16,548
社区成员




char Z[20]="123:456:789735";
CString str;
str.Format("%s",Z);
CString str1;
while(str.GetLength()>0)
{
int len=str.Find(":");
if (len>0)
{
str1=str.Left(len);
str=str.Right(str.GetLength()-str.Find(":")-1);
}
else
{
str1=str;
str="";
}
MessageBox(str1);
}
CString str;
str.Format("%s" , Z);
int i = str.Find(":");
CString strA = str.Left(i);
str = str.Mid(i + 1 , str.GetLength() - 1 - i);
i = str.Find(":");
CString strB = str.Left(i);
str = str.Mid(i + 1 , str.GetLength() - 1 - i);
i = str.Find(":");
CString strC = str.Left(i);
str = str.Mid(i + 1 , str.GetLength() - 1 - i);