"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...
Registered users can post here. Sign in or register to post.
Pages: 12