摘要:
练习5.9 自引用、 程序代码如下:View Code #includeusingnamespacestd;enumContext{c_comment,cpp_comment,string_literal,char_literal,file_end};voidhandle_c_comment(){charch;while(cin.get(ch)){if(ch=='*'){while(cin.get(ch)&&ch=='*');if(ch=='/')break;}}}voidhandle_cpp_comment(){charch;w 阅读全文
posted @ 2012-08-09 23:54
Mr.Rico
阅读(382)
评论(0)
推荐(0)
摘要:
第1章 面向对象方法的优点1. C语言的目标2. C++语言的目标第2章 快速入门——C++简介1. C++关键字第5章 程序员定义数据类型的聚集第6章 内存管理:堆和栈1. 作用域2. 存储类型Static的用法第19章 总结 阅读全文
posted @ 2012-08-09 12:45
Mr.Rico
阅读(436)
评论(0)
推荐(0)
摘要:
第1 章 使用字符串第7章 使用关联容器下面一个交叉引用表达代码,其中包括了getword函数View Code #include#include#include#includeusingnamespacestd;vectorgetwords(conststring&str){vectorret;staticstringdelim="\\/,.;:!~*`\'\"\t\b\n#(){}[]]&=-+";stringword;size_tpos,pos2;size_tlen=str.size();pos=-1;boolflag=true;wh 阅读全文
posted @ 2012-08-09 12:33
Mr.Rico
阅读(441)
评论(0)
推荐(0)

浙公网安备 33010602011771号