function in question: void Population::GetStatistics(float* MaxFitness, float* MinFitness, float* AvgFitness){ vector::iterator iter; float tot = 0.0f; int count = 1; iter = Individuals->begin(); @@ *MaxFitness = *iter->GetFitness(); *MinFitness = *MaxFitness; while(iter != Individuals->end()){ if(iter->GetFitness() > MaxFitness){MaxFitness = iter->GetFitness();}else if(iter->GetFitness() < MinFitness){MinFitness = iter->GetFitness();} tot += iter->GetFitness(); count++; iter++; } *AvgFitness = (tot/(float)count); } Error: /home/cripps/Class/MUN/CS3710/ass4/geneticalgorithm/src/Population.cpp: In member function ‘void Population::GetStatistics(float*, float*, float*)’: /home/cripps/Class/MUN/CS3710/ass4/geneticalgorithm/src/Population.cpp:89: error: request for member ‘GetFitness’ in ‘* iter. __gnu_cxx::__normal_iterator<_Iterator, _Container>::operator-> [with _Iterator = Individual**, _Container = std::vector >]()’, which is of non-class type 'Individual*' what's going on: Individual is a class as part of a genetic algorithm. Individuals is a vector declared as so: vector* Individuals = new vector; thus, *iter should give access to an element of the vector Individuals, thus *iter->GetFitness(); should call the "GetFitness()" function (that does exist).