Tag: std::set
C++ std::set example and tutorial with user defined classes
In this article we will see how to use std::set with user defined classes. If you want to use std::set with user defined classes and use default sorting criteria then overload operator < in the class. Advertisements For example, Suppose our class is Message that contains three properties i.e. • Member content • Sending User …
C++ std::set example and tutorial with user defined classesRead More
c++ std::set example and tutorial with external Sorting criteria | Comparator
In this article we will see how to use external Sorting Criteria i.e. Comparator in std::set. Suppose our class is Message that contains three properties i.e. • Member content • Sending User Name • Receiving User Name Advertisements Requirement: we want to keep only single message sent by each user i.e. only one sent message …
c++ std::set example and tutorial with external Sorting criteria | ComparatorRead More