I'm now trying to figure out how I could sort & print each entry on cs.code() (which is a string). I have found this on the internet but it wouldn't work since it would only sort cs.code() and not its corresponding cs.serial(). Any clue? Thanks!
We have inherited struct code_serial from std::pair< std::string, unsigned int >.
So we get the functionality of std::pair for free - that was the primary reason for inheriting from std::pair.
std::pair is LessThanComparable; ergo our struct code_serial is also LessThanComparable.