G
gbgbgbgb
Hi,
I have a definition
bool operator<(string s_s, string s_t)
{
....
}
and a variable
list<string> concomp;
but when i sort the list
concomp.sort();
it does NOT call the above operator, but rather uses predefined
lexical ordering.
I'm thinking the < might need to be defined differently?
(as g++ already has a < for strings and i need to override it somehow)
I'm using gcc3.2.2 on red hat/mandrake.
Thanks,
-Gill
I have a definition
bool operator<(string s_s, string s_t)
{
....
}
and a variable
list<string> concomp;
but when i sort the list
concomp.sort();
it does NOT call the above operator, but rather uses predefined
lexical ordering.
I'm thinking the < might need to be defined differently?
(as g++ already has a < for strings and i need to override it somehow)
I'm using gcc3.2.2 on red hat/mandrake.
Thanks,
-Gill