dimanche 31 juillet 2016

error: "expected an expression" I am trying to use array in function

void phage :: evaluate(bacteria ba[]) {

    for (int i = 0; i<popsize; i++)
        for (int j = 0; j<gensize; j++)
            fitness += m[i] == ba[i].m[j];
}

here is an evaluate function, declared in struct. when I try to call it, there is an error "expected an expression"

for (int i = 0; i < popsize; i++)
    population[i].evaluate(population[]);

Aucun commentaire:

Enregistrer un commentaire