Is there any problem with my code ?
std::vector weights; int weight[2] = {1,2}; weights.push_back(weight);
It can\'t be compi
Arrays aren't copy constructable so you can't store them in containers (vector in this case). You can store a nested vector or in C++11 a std::array.
vector
std::array