Basically what I am trying to achieve is to create a local (and private) instance of the class deltaKinematics in the class geneticAlgorithm
In the geneticAlgorithm.h file I have:
class DeltaKinematics; //class is defined in separate linked files
class GeneticAlgorithm {
//private
DeltaKinematics deltaRobot;
public:
GeneticAlgorithm(); //constructor
};
This is all fine, but when I go to declare the GeneticAlgorithm constructor, I can’t work out how to construct the instance of DeltaKinematics
This is the geneticAlgorithm.cpp constructor:
GeneticAlgorithm::GeneticAlgorithm(){ //The error given on this line is "constructor for 'GeneticAlgorithm' must explicitly initialize the member 'deltaRobot' which does not have a default constructor"
DeltaKinematics deltaRobot(100); //this clearly isn't doing the trick
cout << "Genetic Algorithmic search class initiated \n";
}
How do I go about initializing that local instance?
Member initializer list: