Subscribe Us

Responsive Advertisement

Advertisement

Unordered map STL cpp/c++

Unordered map STL cpp/c++



#include<bits/stdc++.h>

using namespace std;

int main()

{

    unordered_map<int,string> mp;

    mp[1]="smrity";

    mp[2]="ujjal";

    mp[10]="mithu";

    mp[15]="faisal";

    mp[3]="abhi";

    for(auto u : mp)

    {

        cout<<u.first<<" "<<u.second<<endl;

    }



    return 0;

}




Post a Comment

0 Comments