Convert spaces to |s.
来源:互联网 发布:老虎证券 客户端软件 编辑:程序博客网 时间:2024/06/06 08:33
#include <iostream>#include <fstream>using namespace std;int main(int argc, char *argv[]){ if(argc!=3) { cout << "Usage: CONVERT <input> <output>\n"; return 1; } ifstream fin(argv[1]); // open input file ofstream fout(argv[2]); // create output file if(!fout) { cout << "Cannot open output file.\n"; return 1; } if(!fin) { cout << "Cannot open input file.\n"; return 1; } char ch; fin.unsetf(ios::skipws); // do not skip spaces while(!fin.eof()) { fin >> ch; if(ch==' ') ch = '|'; if(!fin.eof()) fout << ch; } fin.close(); fout.close(); return 0;}
- Convert spaces to |s.
- cannot convert from 'wchar_t *' to 'ATL::CStringT ‘s solution
- cannot convert from 'wchar_t *' to 'ATL::CStringT ‘s solution
- Effective STL 27 convert a container's con_iterators to iterators
- Convert png's from the iPod Touch to readable png's on a MAC
- Convert Sorted List to Binary Search Tree -- leetcodeGiven a singly linked list where elements are s
- IMP-00038: Could not convert to environment character set's handle
- Convert CHtmlView to CHtmlCtrl
- string Convert To XML
- convert UTF8 to SHIFT_JIS
- convert decimal to binary
- Convert Mysql to Oracle
- convert RGB to HLS
- CONVERT to String
- xml Convert To ArrayCollection
- Convert DataView to DataTable
- Convert String to Stream
- convert COLORREF to COLOR16
- 从团购中思索营销的新方式
- 深入体验JavaWeb开发内幕——Apache—DBUtils框架
- 利用SOLR搭建企业搜索平台 之四(MultiCore)
- WordPress 模板制作教程+常用函数
- DLL版本不兼容问题
- Convert spaces to |s.
- [wtl学习]-[第二天]-关于ATL_NO_VTABLE一些困惑
- How To Get Startup Ideas
- 将Applet嵌入页面并显示
- 剖析 linux file system-Ext2
- 黑马程序员_C#基础知识学习笔记:条件语句
- 10年打工总结了6句话
- 生活在 Emacs 中
- 临界区(Critical section)与互斥体(Mutex)的区别