what i have now is for loop and iterate each char in the string
Expand|Select|Wrap|Line Numbers
- string base="[0 3 ; 6 9 ; 12 15 ; 18 21]";
- //i have vector<int>row,vector < vector<int>row > mat;
- //what i want to do with the string is that everytime char != ";"
- row.pushback(str that convert to int)
- //do this when char == ";"
- mat.pushback(row);
and i cant find myself a better way for the code to operate fast.
any help would be great
thanks in advanced