'is there away to get the elements out of strtok and restor them into another string to do operations on them?

this code is to take an equation from the user in the form of a string and then the program configures the confessions and store them in a dynamic array;

now I need a way to store the string (S) in a dynamic array

int main()
{
    char input[1000];
    cout<<"Enter equation: "<<endl;
    cin.getline(input,1000);
    char *s;
        s=strtok(input,"x+");
        while(s!=NULL)
        {
            cout<<s<<endl;
            s=strtok(NULL, "x+");
        }
    
}


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source