第一次使用strtok需给字符窜
以后调用只需提供token参数

解决方案 »

  1.   

    string strtok ( string str, string token )
    strtok() splits a string (str) into smaller strings (tokens), with each token being delimited by any character from token. That is, if you have a string like "This is an example string" you could tokenize this string into its individual words by using the space character as the token