惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

W
WeLiveSecurity
爱范儿
爱范儿
MyScale Blog
MyScale Blog
F
Fortinet All Blogs
Y
Y Combinator Blog
罗磊的独立博客
IT之家
IT之家
人人都是产品经理
人人都是产品经理
Latest news
Latest news
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Vercel News
Vercel News
K
Kaspersky official blog
WordPress大学
WordPress大学
T
Tailwind CSS Blog
Stack Overflow Blog
Stack Overflow Blog
云风的 BLOG
云风的 BLOG
T
Threatpost
J
Java Code Geeks
美团技术团队
Spread Privacy
Spread Privacy
B
Blog RSS Feed
L
Lohrmann on Cybersecurity
AWS News Blog
AWS News Blog
S
Schneier on Security
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Hugging Face - Blog
Hugging Face - Blog
NISL@THU
NISL@THU
V
Visual Studio Blog
博客园_首页
V
V2EX
Cyberwarzone
Cyberwarzone
The Hacker News
The Hacker News
Last Week in AI
Last Week in AI
G
GRAHAM CLULEY
A
About on SuperTechFans
N
News | PayPal Newsroom
G
Google Developers Blog
N
Netflix TechBlog - Medium
The Cloudflare Blog
www.infosecurity-magazine.com
www.infosecurity-magazine.com
有赞技术团队
有赞技术团队
L
LINUX DO - 最新话题
博客园 - 司徒正美
The Last Watchdog
The Last Watchdog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
小众软件
小众软件
Forbes - Security
Forbes - Security
V
Vulnerabilities – Threatpost
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
Google DeepMind News
Google DeepMind News

博客园 - SunWentao

Man or Honor 怒海潜将,壮志潜龙 美军的Navy Dive Carl Brashear unitycn.cn 关停了 windows 开发者神器 tc – total command和替代品 c#版本与vs的对应关系 十年前的博客,今天终于又回来了 配置total commander 显示所有或特定文件夹 (带点的文件夹) 如何删除cygwin 在word中实现代码的语法高亮 最好用最方便的sqlite管理工具 日本小孩的教育 zz 2013年公司年会照片 Php Fatal error: Allowed memory size of 33554432 bytes exhausted 的解决办法 跟乌克兰人学编程1 我不怕会1000种拳法的人,但我怕只会一种拳法,练1000遍的人. by 李小龙 乌克兰人的编程习惯 换个活法:临终前会后悔的25件事 内心强大的指标 史丹佛毕业25年 我最有钱的同学是...zz 榨汁机食谱大全
c++ 11 practise -1-
SunWentao · 2013-04-12 · via 博客园 - SunWentao

c++ 11 practise -1-

2013-04-12 11:09AM

#include <iostream>
#include <array>
#include <forward_list>
#include <string>
#include <unordered_set>
using namespace std;

int main()
{
    array<int, 3> arr;
    get<0>(arr) = 1;
    get<1>(arr) = 2;
    get<2>(arr) = 3;
    cout << "(" << get<0>(arr) << get<1>(arr) << get<2>(arr) << ")" << endl;

    // forward_list
    forward_list<string> words1;// {"the", "greatest", "country", "in", "the", "world"};
    words1.push_front("the");
    words1.push_front("greatest");
    words1.push_front("salesman");
    words1.push_front("in");
    words1.push_front("the");
    words1.push_front("world");

    long double f = 23.43;
    cout << to_string(f) << endl;
    for(auto ci = words1.begin(); ci != words1.end(); ++ci)
        cout << *ci << " ";
    cout << endl;
    forward_list<string> words2(words1.begin(), words1.end());
    forward_list<string> words3(words1);
    //forward_list<string> words4 (words1.size(), "Mo");

    // unordered_set
    // set,map : based on 
    unordered_set<int> set1;
    set1.insert(343);
    set1.insert(3);
    set1.insert(34);
    set1.insert(43);
    set1.insert(33);
    set1.insert(443);
    auto d = set1.find(43);
    if(d != set1.end())
        cout << "find it" << endl;
    return 0;
}