A struct pair is a heterogeneous pair of values. Its data members are first and second.
#include <pair>
|
| |
|
Introduces a pair.
| |
|
| ||
|
|
| |
|
| ||
|
|
| |
Employee irene("Irene", "Eneri");
Employee leo("Leonard", "Eneri");
typedef int Social_security_number;
pair<Social_security_number, Employee> p1(7812, irene), p2(5555, leo);
assert( p1.first == 7812 );
assert( p2.second == leo );