Hi, I am trying to sort a vector that contains pointers to structs. I read a lot in the internet and in this forum about that. However I do not know what I do wrong.
Here are the parts in the code that the problem concernes:
Where I try to call the sort:
void structure::neighbours() {
sort(Cross.begin(),Cross.end(),OrderCrossings);
}
error: no matching function for call to 'sort(std::vector<crossing*>::iterator, std::vector<crossing*>::iterator, <unresolved overloaded function type>)'|
c:\mingw\bin\..\lib\gcc\mingw32\4.5.0\include\c++\bits\stl_algo.h|5236|
Thanks, for this information. I havn't used static member functions so far, but I tried to use them now. The problem is now that it results in an undefined reference. What do I need to add in order to not get a linker error?