How can I populate a vector of map along with a rowID , or an iterator for each row of a valuepair Set
Like for example
typedef std::map
in short:
mapDB_vec.push_back(std::make_pair(0, mapDB_colVal));
longer:
you don't need that rowID, vector index is good enough
more longer:
struct Row {
std::string x;
std::string y;
Row(std::string const& x_, std::string const& y_): x(x_), y(y_)
{}
};
vector mapDB_vec;
mapDB_vec.push_back(Row("Apple", "Red"));
mapDB_vec.push_back(Row("Pear", "Red"));