Check out example codes for "how to copy elements from hash to vector c++". It will help you in understanding the concepts better.

Code Example 1

/* make sure that the vector can include the element in the map
*/

#include <vector>
#include <map>
using namespace std;

int main(){
    map<int, vector<vector<int>> hash;
  	vector<vector<vector<int>>> putTo;
  	map<int, vector<vector<int>>::iterator it;
  	
  	for(it = hash.begin(); it != hash.end(); it++){
      	// notice if the putTo was a 2D we can add it->second to it;
      	// it have to be 3D in order to hold a 2D array
    	putTo.push_back(it->second);  
    }
	return 0;
}

Learn ReactJs, React Native from akashmittal.com