Yes, thanks Tyler. I was able to find the answer with a lot of digging and comparing code. I had to add a windows specific something:
void set_sort_function (bool (__cdecl *a_function)(GET_entry *, GET_entry *)); --- In [email protected], Tyler Littlefield <ty...@...> wrote: > > Hello, > What you want is function pointers, for which you'll need to use a typedef if > I understand you right; try a google for function pointer and it will show > you how they work. > HTH, > Thanks, > Tyler Littlefield > http://tds-solutions.net > Twitter: sorressean > > On Mar 15, 2010, at 8:29 PM, Jimmy Johnson wrote: > > > I have an attribute `sort_function' which is to be assigned a function > > taking two arguments of pointers to GET_entry. > > > > The function will be used in a call to sort from within a descendant of > > class vector, as in: > > > > std::sort (begin(), end(), sort_function); > > > > I want a feature `set_sort_function' which takes the appropriate type > > argument for assignment to `sort_function'. > > > > Can't seem to get the syntax right. Any help would be appreciated. > > > > bool (*sort_function)(GET_entry *, GET_entry *); > > > > void set_sort_function (?? some-type-here ?? a_function) { > > sort_function = a_function; > > }; > > > > best regards, > > > > Jimmy J. Johnson > > > > >
