Pass start and end of a vector to the sort function using c ++ method overload

1

I want to access using overload using node which is an object of the base class method getInicioVetor and getFimVetor within the child class, I wonder if there is a way to do this? I tried it just 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);
    
asked by anonymous 26.09.2018 / 03:58

0 answers