I'm trying to create two dimensional std::vector, that will hold objects of this class I inherited. The problem I have is that this class has only one constructor, and that uses one parameter (std::string to be precise).
#define HEIGHT 4
#define WIDTH 4
#include
using std::vector;
static vector > reaper(HEIGHT, vector (WIDTH));
This should create 4x4 matrix of Reaper objects in my vector. At least I know it would work if I had constructor with no parameters available.
But, this is how I would instantiate Reaper object:
Reaper r0("R0");
Reaper* r1 = new Reaper("R1");
Now, I can't figure out how to include this constructor into my vector construction?
JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)