I need to initialize an array of objects of a parametrized constructor . How can i do it in best possible way ?
# include
# include&l
This is solved using std::vector constructor taking size and base element :
A a2(1);
std::vector tab(10, a2);