$NetBSD: patch-an,v 1.1 2006/04/28 16:23:55 joerg Exp $ --- src/Genetic.hpp.orig 2006-04-28 16:16:16.000000000 +0000 +++ src/Genetic.hpp @@ -216,9 +216,9 @@ public: virtual Genetic_Operator *Choose_Operator(void) { int max=(int)total_op_weight; - list *>::iterator start=operators.begin(); - list *>::iterator end=operators.end(); - list *>::iterator iter; + typename list *>::iterator start=operators.begin(); + typename list *>::iterator end=operators.end(); + typename list *>::iterator iter; int r=rand()%max; int count=0; for (iter=start;iter!=end;iter++) { @@ -249,7 +249,7 @@ public: Genetic_Population *newpop=new Genetic_Population(p->size); int cur_size=0; while (cur_sizesize) { - Genetic_Operator *op=Choose_Operator(); + Genetic_Operator *op=this->Choose_Operator(); if ( (cur_size+op->NumOfResults())>newpop->size) continue; for (i=0;iNumOfOperands();i++) { @@ -264,7 +264,7 @@ public: cur_size++; } } - newpop->Eval_Fitness(fit_func); + newpop->Eval_Fitness(this->fit_func); return newpop; }