cpp
float TForm1::Objective(GAGenome& g) { GA2DBinaryStringGenome & genome = (GA2DBinaryStringGenome &)g; float score=0.0; int count=0; for(int i=0; i<genome.width(); i++){ for(int j=0; j<genome.height(); j++){ if(genome.gene(i,j) == 0 && count%2 == 0) score += 1.0; if(genome.gene(i,j) == 1 && count%2 != 0) score += 1.0; count++; } } return score; }
y en el .h
cpp
TForm1::Objective(GAGenome& g);
No se si este bien asi?Pero aun me da error la misma linea.