My Pair

#include <iostream>
#include <utility>
using namespace std;
 
int main()
{
    pair<int,string>mypair;
  int a;string b;
  cin>>a>>b;
    mypair.first =a;
    mypair.second =b ;
 
    cout << mypair.first << " " ;
    cout << mypair.second << endl ;
 
    return 0;

1 comment:

  1. to 100% evaluation ==
    just make a extra space between angular bracket and mypar like this-
    pair mypair;

    ReplyDelete