CStringA str= "->中国->美国->英国->德国->";
CStringA resToken;
int curPos = 0;
//方法一,用Tokenize
resToken= str.Tokenize("->",curPos);
while (resToken != "")
{
printf("Resulting token: %s\n", resToken);
resToken = str.Tokenize("->", curPos);
};
//方法二,用Find和Mid
int n = str.Find( "->" );
while ( n != -1 )
{
resToken = str.Mid( n + 2, 4 );
if ( resToken == "") break;
printf("Resulting token: %s\n", resToken);
n = str.Find( "->", n+2 );
}