primer 1112
来源:互联网 发布:运营商云计算 编辑:程序博客网 时间:2024/06/05 17:36
/*************************************************************************> File Name: test6.cpp> Author:keson > Mail:keson@bupt.edu.cn > Created Time: 2015年01月23日 星期五 14时19分33秒 ************************************************************************/#include<iostream>#include<vector>#include<utility>#include<sstream>using namespace std;pair<string,int> process(string &line){ string s; int val; istringstream record(line); record>>s>>val; return {s,val};}int main(){ vector<pair<string,int>> words; cout<<"Enter the strings and numbers:"<<endl; string line; while(getline(cin,line)) words.push_back(process(line)); cout<<endl; cout<<words.size()<<endl; for(auto word:words) cout<<word.first<<" "<<word.second<<endl;}
0 0
- primer 1112
- C++ Primer
- c++ primer
- c++ primer
- x64 primer
- [primer]chapter3
- C++primer
- JQuery Primer
- primer 习题
- IRC primer
- tuning-primer
- 《C++primer》
- Software Primer
- Nginx Primer
- C++ primer
- C++ primer
- C++ primer
- Primer 学习 -
- oracle的正则表达式
- C++易混知识点3. New Operator, Operator New, Placement New 实例分析,比较区别
- 加载由mxml生成的swf,并访问内部方法
- Target runtime Apache Tomcat v5.5 is not defined
- 打印Log的工具类
- primer 1112
- Android--六款值得推荐的android(安卓)开源框架简介
- 支付宝调试错误,错误代码 ILLEGAL_SIGN的解决
- 改变spring-servlet.xml名字和默认位置
- SDUT 1569 选夫婿1
- 基础框架-文件操作-目录操作
- 编译器的编译基本过程
- C++中指针和引用的区别
- volley