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>
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>
