0 Star 0 Fork 0

BingBox / Cpp-Primer

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
ex9_18.cpp 602 Bytes
一键复制 编辑 原始数据 按行查看 历史
yue 提交于 2015-08-24 16:47 . remove things
//
// ex9_18.cpp
// Exercise 9.18
//
// Created by pezy on 12/3/14.
//
// @Brief Write a program to read a sequence of strings from the standard input into
// a deque. Use iterators to write a loop to print the elements in the deque.
#include <iostream>
#include <string>
#include <deque>
using std::string; using std::deque; using std::cout; using std::cin; using std::endl;
int main()
{
deque<string> input;
for (string str; cin >> str; input.push_back(str));
for (auto iter = input.cbegin(); iter != input.cend(); ++iter)
cout << *iter << endl;
return 0;
}
C++
1
https://gitee.com/Lv80/Cpp-Primer.git
git@gitee.com:Lv80/Cpp-Primer.git
Lv80
Cpp-Primer
Cpp-Primer
master

搜索帮助