F
fatgirl.brown
Hi all,
I am attempting to initialize a vector of a vector in a constructor
with some clean-looking syntax and am not sure of how to go about this.
For instance:
double weight;
vector< vector<unsigned> > posInd;
Table() :
weight(0), posInd(???)
{}
Table(const TableEntry& o) :
weight(o.weight), posInd(???)
{}
Table(double weight = 0.0, vector< vector<unsigned> > posInd) :
weight(weight), posInd(???)
{}
Many thanks for your patience!
I am attempting to initialize a vector of a vector in a constructor
with some clean-looking syntax and am not sure of how to go about this.
For instance:
double weight;
vector< vector<unsigned> > posInd;
Table() :
weight(0), posInd(???)
{}
Table(const TableEntry& o) :
weight(o.weight), posInd(???)
{}
Table(double weight = 0.0, vector< vector<unsigned> > posInd) :
weight(weight), posInd(???)
{}
Many thanks for your patience!