Is there any problem with my code ?
std::vector weights;
int weight[2] = {1,2};
weights.push_back(weight);
It can\'t be compi
You cant do that simply.
It's better you use either of these:
vector (it's basically a two dimensional vector.It should work in your case)
vector< string > (string is an array of characters ,so you require a type cast later.It can be easily.).
you can declare an structure (say S) having array of int type within it i.e.
struct S{int a[num]} ,then declare vector of
vector< S>
So indirectly, you are pushing array into a vector.