摘要: 一.多重继承 #include using namespace std; class Base1{public: Base1(){ cout clone(); pBase1->speakClearly(); //pBase1->mumble();//complie-time error delete pBase1; cout clone(); pBase... 阅读全文
posted @ 2007-11-24 13:21 中土 阅读(3200) 评论(0) 推荐(2) 编辑
摘要: volatile 影响编译器编译的结果,指出,volatile 变量是随时可能发生变化的,与volatile变量有关的运算,不要进行编译优化,以免出错,(VC++ 在产生release版可执行码时会进行编译优化,加volatile关键字的变量有关的运算,将不进行编译优化。)。 例如: volatile int i=10; int j = i; ... int k = i; volatile 告诉编... 阅读全文
posted @ 2007-11-24 02:44 中土 阅读(117770) 评论(29) 推荐(30) 编辑
摘要: 11.23 1. char str1[] = "abc"; char str2[] = "abc"; const char str3[] = "abc"; const char str4[] = "abc"; const char* str5 = "abc"; const char* str6 = "abc"; cout << boolalpha << ( str1==str2 ) << endl... 阅读全文
posted @ 2007-11-24 02:23 中土 阅读(969) 评论(0) 推荐(0) 编辑
©2005-2008 Suprasoft Inc., All right reserved.