Advertisement
dbarshan

Parse Index List

Jun 22nd, 2021
1,069
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.27 KB | None | 0 0
  1. vector<vector<int>> parseIndexList(vector<string> &strIndexList){
  2.     vector<vector<int>> result;
  3.  
  4.     for ( auto s : strIndexList){
  5.         int row = stoi(s.substr(0, s.find(" ")));  
  6.         int col = stoi(s.substr(s.find(" ")+1));
  7.         result.push_back({row,col});
  8.     }
  9.     return result;
  10. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement