I am fairly new to C++ and I don't know how to define the function push_back to my struct:
struct Arco {
int i, j;
Arco () {};
Arco (const Arco& obj): i(obj.i), j(obj.j) {};
Arco(int _i, int _j) : i(_i), j(_j) {}
};
I have a vector of vector of arcs:
vector < vector < Arco > > Df;
Df = vector < vector < Arco > > ( nn, vector < Arco > ( ) );
I want to be able to allow the command:
Df[i][j].push_back(Arco(u,v));
What do I suppose to do?