In file included from /usr/include/c++/4.6/algorithm:63:0,
from J.cpp:7:
/usr/include/c++/4.6/bits/stl_algo.h: In function '_RandomAccessIterator std::__unguarded_partition(_RandomAccessIterator, _RandomAccessIterator, const _Tp&) [with _RandomAccessIterator = Star*, _Tp = Star]':
/usr/include/c++/4.6/bits/stl_algo.h:2253:70: instantiated from '_RandomAccessIterator std::__unguarded_partition_pivot(_RandomAccessIterator, _RandomAccessIterator) [with _RandomAccessIterator = Star*]'
/usr/include/c++/4.6/bits/stl_algo.h:2284:54: instantiated from 'void std::__introsort_loop(_RandomAccessIterator, _RandomAccessIterator, _Size) [with _RandomAccessIterator = Star*, _Size = long int]'
/usr/include/c++/4.6/bits/stl_algo.h:5407:4: instantiated from 'void std::sort(_RAIter, _RAIter) [with _RAIter = Star*]'
J.cpp:57:21: instantiated from here
/usr/include/c++/4.6/bits/stl_algo.h:2215:4: error: passing 'const Star' as 'this' argument of 'const bool Star::operator<(Star)' discards qualifiers [-fpermissive]