#include<utility>
#include<tuple>

#include "stdafx.h"
#include<string>

using namespace std;

int _tmain(int argc, _TCHAR* argv[])
{
    pair<int, string>p(42, "forty-two");
    cout << p.first << " " << p.second << endl;

    p = make_pair<int,string>(112,"one-one-two") ;
    cout << p.first << " " << p.second << endl;

    return 0;
}
// Can some one help  to figure out,i use visual studio 2013 and here on line 14
//i get an error -no instance of function template.It's something to do with make_pair.Thanks  

Try

p = make_pair(112,"one-one-two");

It works thanks

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.