how to pushback a 2D vector

  2d-vector, c++, push-back, vector

let’s say I have a vector storing vectors of strings. std::vector<std::vector<std::string>> MyVec = { {}, {} }

I want to use anything equivalent to .push_back(X) such that the vector will now look as following: { {X}, {} }.

Does anyone have an idea for a way to solve this?

Source: Windows Questions C++

LEAVE A COMMENT