I have got this class:
class sample{
private:
int number;
string adress;
public:
int get_number();
string get_adress();
sample();
~sample();
};
I allocate dyanmically memory space like this(cause i need an array of pointers to obects):
sample** samples;
samples=new sample*[20];
for(int i=0;i<20;i++){
samples[i]=new sample;}
My question is how can i sort this array using std::sort function according their string adress?