摘要: 拷贝构造函数的标准写法如下: class Base { public: Base(){} Base(const Base &b){..} // } 上述写法见得最多,甚至你认为理所当然。 那么如果我们不写成引用传递呢,而是值传递,那么会怎样? class Base { public: Base(){} Base(const Base b){} // } 编译出错:erro... 阅读全文
posted @ 2007-09-14 17:10 中土 阅读(9958) 评论(2) 推荐(1)
摘要: baidu笔试题: #include using namespace std; int foo(int a) { int x, y, z; x = a/100; //百位 y = (a - x*100)/10; //十位 z = a - x*100 - y*10; //个位 //cout 0 ? (i -27) : 1; for... 阅读全文
posted @ 2007-09-14 10:04 中土 阅读(767) 评论(0) 推荐(0)
©2005-2008 Suprasoft Inc., All right reserved.