Advertisement
Guest User

Untitled

a guest
Nov 27th, 2014
147
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. Adam 2 5 1 5 3 4
  2. John 1 4 2 5 22 7
  3. Kate 7 3 4 2 1 15
  4. Bill 2222 2 22 11 111
  5.  
  6. vector<int> out;
  7.  
  8. for (int i = 0; i < line.length(); i++) {
  9.  
  10. if (isdigit(line.at(i))) {
  11. stringstream const_char;
  12. int intValue;
  13. const_char << line.at(i);
  14. const_char >> intValue;
  15. out.push_back(intValue);
  16. }
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement