S
Steve555
Hi,
I've ended up with many, many operator< functors like this
bool operator<(UserRating lhs, UserRating rhs) {
return lhs.userID < rhs.userID;
}
to sort the many custom structs I have, and the typedefined vectors I
have to store them.
All of the structs and their vectors are neatly organized in to one
myVecDefiness.h file, but the functors are dotted about all over the
place. If I try to put them in myVecDefiness.h (or any other header),
then the compiler complains of multiple definitions (even though I
have #ifndef etc. in the header). But if I put them in a single .cpp
then the compiler doesn't find them.
What's the neatest way to organize this?
Thanks
Steve
I've ended up with many, many operator< functors like this
bool operator<(UserRating lhs, UserRating rhs) {
return lhs.userID < rhs.userID;
}
to sort the many custom structs I have, and the typedefined vectors I
have to store them.
All of the structs and their vectors are neatly organized in to one
myVecDefiness.h file, but the functors are dotted about all over the
place. If I try to put them in myVecDefiness.h (or any other header),
then the compiler complains of multiple definitions (even though I
have #ifndef etc. in the header). But if I put them in a single .cpp
then the compiler doesn't find them.
What's the neatest way to organize this?
Thanks
Steve