码迷,mamicode.com
首页 > 编程语言 > 详细

Java HashSet和LinkedHashSet的用法

时间:2016-05-11 23:26:56      阅读:319      评论:0      收藏:0      [点我收藏+]

标签:

include <iostream>
#include <map>
using namespace std;
int main()
{
    map<string,map<string,string> > mapmaps;
    map<string,string> mapmap;
    mapmap.insert(pair<string,string>("ysl","ysh"));
    mapmaps.insert(pair<string,map<string,string> >("ysy",mapmap));

    cout<<mapmaps.begin()->first<<endl;
    cout<<mapmaps.begin()->second.begin()->first<<endl;
    cout<<mapmaps.begin()->second.begin()->second<<endl;
    return 0;
}
结果:

ysy
ysl
ysh

Process returned 0 (0x0) execution time : 0.250 s
Press any key to continue.

 

Java HashSet和LinkedHashSet的用法

标签:

原文地址:http://www.cnblogs.com/destim/p/5483897.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
分享档案
周排行
mamicode.com排行更多图片
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!