N
Nick Keighley
Hi,
is there a way of initialising a vector in a similar fashion to
initialising an array?
consider:
Shape* triangle = new Triangle ();
Shape* square = new Square ();
Shape* shape_arr [] = {&triangle, &square};
is there some of doing something like this?:
vector<Shape*> shape_vec = {&triangle, &square};
is there a way of initialising a vector in a similar fashion to
initialising an array?
consider:
Shape* triangle = new Triangle ();
Shape* square = new Square ();
Shape* shape_arr [] = {&triangle, &square};
is there some of doing something like this?:
vector<Shape*> shape_vec = {&triangle, &square};