please could some one explain to me how i implement sorting code for the following:
#include <iostream>
#include <list>
void main(void)
{
list<int *> intPtrList;
int a = 3, b = 7, c = 5;
intPtrList.push_back(&a);
intPtrList.push_back(&b);
intPtrList.push_back(&c);
intPtrList.sort(); // doesnt work (it will sort the pointers)
}
as you see in the code intPtrList.sort() wount work,
but list has an overloded version of sort that takes an parameter
but i dont under stand how to use it. so could some one tell me what that parameter should me to allow me to sort the data correct...
\\dummy