Answers for "store array in vector"

C++
0

store array in vector

#include <vector>
#include <array>

std::vector<std::array<int, 2>> weights;
std::array<int, 2> weight = {1, 2};
weights.push_back(weight);
Posted by: Guest on January-15-2022

Browse Popular Code Answers by Language