Hello I have a problem:
I have 4 files: AllOnesGA.cpp, Population.h, Individual.h, GeneticAlgorithm.h
In Individual.h I declare
private:
int chromosome[];
And an error message was thrown
error: flexible array member ‘Individual::chromosome’ not at end of ‘class Individual’
> What I'm doing wrong?
1. Using a FAM when you should be using std::vector.
2. Not reading the error message.
"not at end of ‘class Individual’" is very specific.
You can only have one FAM, and it MUST be the last member of the class/struct.