stream.c
资源名称:leda.tar.gz [点击查看]
上传用户:gzelex
上传日期:2007-01-07
资源大小:707k
文件大小:0k
源码类别:
数值算法/人工智能
开发平台:
MultiPlatform
- #include <LEDA/basic.h>
- #include <LEDA/stream.h>
- #include <LEDA/list.h>
- main(int argc, char* argv[])
- {
- string_istream args(argc,argv);
- list<string> L;
- string s;
- while(args >> s) cout << s << "n";
- newline;
- cmd_istream IN(read_string("cmd = "));
- while (IN) L.append(read_line(IN));
- L.print('n');
- newline;
- cmd_ostream OUT("more");
- L.print(OUT,'n');
- OUT.flush();
- return 0;
- }