[galib] Help using GALib: customising crossover operator

#SAWHNEY ADITI# aditi at pmail.ntu.edu.sg
Mon Aug 1 02:16:45 EDT 2005


I have customised my crossover operator but get the following errors during compiling.
the program: please help me!! its important!!

int RouteCrossover(const GAGenome & , const GAGenome &, GAGenome *);
int SwapMutator(GAGenome & c, float );
int main(int argc, char *argv[])

  GARealAlleleSet alleles;
  GARealGenome genome(numCustomer+numVeh, alleles, objective);

W:\Latest\sce03-056\main.C(105) : error C2664: 'int (__cdecl *__thiscall GAGenome::crossover(int (__cdecl *)(const class GAGenome &,const class GAGenome &,class GAGenome *,class GAGenome *)))(const class GAGenome &,const class GAGenome &,class GAGen
ome *,class GAGenome *)' : cannot convert parameter 1 from 'int (const class GAGenome &,const class GAGenome &,class GAGenome *)' to 'int (__cdecl *)(const class GAGenome &,const class GAGenome &,class GAGenome *,class GAGenome *)'
        None of the functions with this name in scope match the target type

More information about the galib mailing list