I\'m using the vector class in the STL library for the first time. How should I add to a specific row of the vector array?
struct x{ vector
Another way to define a 2-d vector is to declare a vector of pair's.
vector < pair > v; **To insert values** cin >> x >>y; v.push_back(make_pair(x,y)); **Retrieve Values** i=0 to size(v) x=v[i].first; y=v[i].second;
For 3-d vectors take a look at tuple and make_tuple.