摘要: 1. const成员函数 只是告诉编译器,表明不修改类对象. 但是并不能阻止程序员可能做到的所有修改动作,比如对指针的修改,编译器可能无法检测到2. 类体外定义的const成员函数,在定义和声明处都需要const修饰符 1 class classname 2 { 3 public: 4 classname() {} 5 ~classname(); 6 7 void fo... 阅读全文
posted @ 2007-06-06 23:57 中土 阅读(4593) 评论(1) 推荐(1)
©2005-2008 Suprasoft Inc., All right reserved.