C++ Pair

#include<iostream>
#include<utility>
using namespace std;
int main()
{
    pair <string, int> a;

    a.first = "Aubdur Rob Anik";
    a.second = 73;

    pair <string, int> p("Anik Das", 70);

    pair<string, int> x;

    x = make_pair("Rafiq Das", 83);

    cout << a.first << " ----> " << a.second << endl;
    cout << p.first << " ----> " << p.second << endl;
    cout << x.first << " ----> " << x.second << endl;

    return 0;
}

Comments