Parsing Vector<String> into a string. : I'm trying to tokenize a string. The strings I'm working on have the following format.... name,city,major,color,hobbies,age and I'm using the code below to do that. And temp is a string. 
       
        { 
        cin>>command;
        vector <string> tokens;
        stringstream check(command);
        string middle;
        while(getline(check, intermediate, ','))
        {
            tokens.push_back(intermidiate);
        }

        for(int i = 0; i<tokens.size(); i++)
        {
            cout << tokens[i] <<endl;
           
        }
            temp = tokens[1];
            cout<<temp; 

And I'm trying to parse the vector string into just a string but my program crashes when I tried to do that... Is there a way to parse it into just a string or should I try something else entirely? 

Thanks!