#include #include #include // Required for pair and make_pair using namespace std ; int main() { // Declaring and initializing a pair pair author("Scott", "Meyers") ; // Accessing elements cout << "Author's first name: " << author.first << endl; cout << "Author's last name: " << author.second << endl; // Modifying elements author.first = "Herbert" ; author.second = "Schildt" ; cout << "Author's first name: " << author.first << endl; cout << "Author's last name: " << author.second << endl; // Using make_pair pair student = make_pair( "John", 22 ) ; cout << "Name: " << student.first << endl; cout << "Age: " << student.second << endl; return 0; }