#include <iostream>
#include <stdlib.h>
#include <string>
#include <string.h> //strtok头文件
using namespace std;
int main()
{
string tt;
cin>>tt;
char *s = (char*)tt.c_str();
char *p = strtok(s,"->");
cout<<p<<endl;
while(p!=NULL){
p = strtok(NULL,"->");
cout<<p<<endl;
}
return 0;
}
string转char*
string s = "123";
char*p = (char*)s.c_str();
char*转string
char*p = "123456";
string s = p;