ï»ż

Ɓadny brzuch

mam Buildera 6 personal, pisze program korzystajacy z vcl i stl,
zrobiłem sobie:

vector<myclass>ble;

po zapełnieniu chcialem sobie to posortowac (funkcja sort z algorithms.h)

sort(ble.begin(),ble.end());

no i tytaj sie sypie:

[C++ Error]_function_base.h ... operator< not implemented in type myclass for arguments of the same type

template <class _Tp>
struct less : public binary_function<_Tp,_Tp,bool>
{
bool operator()(const _Tp& __x, const _Tp& __y) const { return __x < __y; } // w tej linijce
};

oczywiscie przeladowalem operator< i dziala bo sprawdzałem dla 2óch wpisanych rêcznie.

dzienx z góry
Użytkownik flymolo edytował ten post 26 kwiecień 2005, 00:28


heh dobra juz znalazlem
jakby ktos mial podobny problem to tu jest link
http://bdn.borland.c...10,10434,0.html

  • zanotowane.pl
  • doc.pisz.pl
  • pdf.pisz.pl
  • zsf.htw.pl
  •