Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Adam 2 5 1 5 3 4
- John 1 4 2 5 22 7
- Kate 7 3 4 2 1 15
- Bill 2222 2 22 11 111
- vector<int> out;
- for (int i = 0; i < line.length(); i++) {
- if (isdigit(line.at(i))) {
- stringstream const_char;
- int intValue;
- const_char << line.at(i);
- const_char >> intValue;
- out.push_back(intValue);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement