This is my function that needs to print all elements from transports
array of pointers which have bigger price than the Transport *t element
void pecatiPoloshiPonudi(Transport **ponudi, int brEl, Transport &T)
{
//cout<<T.getDestinacija();
for (int i=0;i<brEl;i++)
{
if(T.getPrice() < ponudi[i]->getPrice())
{
cout<<ponudi[i]->getDestinacija()<<" "<<ponudi[i]->getRastojanie()<<" "<<ponudi[i]->getPrice()<<endl;
}
}
}
I got this one, but i need it to sort it in ascending order, depending on their price
.