C++, tokenizer, vectors, and strings (NEVERMIND)

gwlam12

Diamond Member
Apr 4, 2001
6,946
1
71
Hey

Here's my situation.

I have run tokenizer on a line, and tokenizer has returned to me a vector of strings.

I have created my own vector of strings, and now I want to push the first element from the first vector into my own vector. How do I do that?

I have:

vector<string>vec;
vector<string>words;
string line;

vec = tokenize(line);
words.push_back(vec[0]);

When I run the program, it crashes during push_back. I have omitted the rest of the program as I find them irrelevant.

Thanks.

<EDIT> NEVERMIND. THE FIRST CHARACTER WAS AN ILLEGAL CHARACTER OR SOMETHING.</EDIT>