Hey there,
I got a problem with the push_back function of a vector to fill it with strings.
This is the code:
labelVector.push_back(labelString);
labelString works fine, but the labelVector just wouldn't get longer. It always has the size 1 and if I take it out of the class via a getter function
vector<string> openAssembler::getLabelVector(){
return labelVector;
}
it's size suddenly turns out to be 0.
Anybody has a clue what that could be?
Hope you guys can help me.
Thanks!
Last edited on
Write a complete example that compiles so that we can see the problem duplicated that way.
Of what type is
labelString
?
1 2 3
|
char *labelString; // Is it this one?
char labelString[...]; // This one?
string labelString; // Or this one?
|
Last edited on