primer 练习题1033
来源:互联网 发布:python公约数 编辑:程序博客网 时间:2024/04/24 13:07
/*************************************************************************> File Name: test12.cpp> Author:keson > Mail:keson@bupt.edu.cn > Created Time: 2015年01月22日 星期四 13时40分41秒 ************************************************************************/#include<iostream>#include<iterator>#include<fstream>#include<algorithm>using namespace std;void div(string &infile,string &outfile1, string &outfile2){ ifstream in(infile); ofstream out1(outfile1); ofstream out2(outfile2); istream_iterator<int> int_it(in),eof; ostream_iterator<int> out_it1(out1," "); ostream_iterator<int> out_it2(out2," "); while(int_it!=eof) if(*int_it%2) out_it1=*int_it++; else out_it2=*int_it++;}int main(){ string infile="infile"; string outfile1="outfile1"; string outfile2="outfile2"; div(infile,outfile1,outfile2); }
0 0
- primer 练习题1033
- 《C++ primer》第一章练习题
- c++primer 练习题模板
- !!!C++ Primer 练习题
- C++ Primer练习题
- C++ Primer 5 练习题答案
- c primer plus9.1练习题
- c++ primer 练习题 Section 2.8
- c++primer部分练习题答案
- C++ Primer 学习笔记关于练习题6.12
- 《C Primer Plus》练习题2-12
- C Primer Plusl练习题(1-2)
- c++ primer 练习题 Exericise 2.3.3
- c++primer plus 编程练习题2
- c++ primer 入门练习题 1.4.1节
- c++ primer第五章练习题总结
- c++Primer Plus第六版练习题答案
- C++primer Plus 第四章练习题
- 一些dos 命令学习
- 一个优秀电子工程师需要具备哪些技术
- 解决JQuery中$与JS插件库相冲突问题
- object-c 基础小结
- 烤馍片(KMP) 字符串遍历
- primer 练习题1033
- 等待与你相遇
- Cent os 6.4 Cobbler搭建
- MVAPICH2多线程支持问题
- SpringMVC映射Date类型
- log4j中logger标签的用途
- oracle编程入门笔记2015-01-22--解释计划
- Map的遍历输出和Collections以及Properties
- [解决方法]回收站东西删不掉