"Segmentation fault (core dumped)" Error

Pages: 12
Does sort() use < so it is checking the struct object contents and finds/uses the < operator function to determine which is smaller / larger?
Exactly. If you remove the operator<(...) the compiler will complain. Unfortunately usually rather cryptic...
Topic archived. No new replies allowed.
Pages: 12