Pass vector start and end to Sort function using c++ method overload

Asked

Viewed 44 times

1

I want to access using overload using node which is a base class object method getInicioVetor and getFimVetor within the daughter class, I wonder if there is a way to do this? I tried so only that it did not work.

static bool ordenar(const TRegistro &f1, const TRegistro &f2){
   return f1.valor < f2.valor;
}

TRegistro getInicioVetor(){
    it = x.begin();
    return *it;
}

TRegistro getFimVetor(){
    it = x.end();
    return *it;
}


sort(no->getInicioVetor(), no->getFimVetor(), ordenar);
No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.