摘要: google面试题: #include #include #include using namespace std; struct Node { char data; Node * left; Node * right; }; enum Tag{goLeft, goRight, goBack }; /* 打印从根到叶子结点之路径 */ void PrintP... 阅读全文
posted @ 2007-10-23 12:50 中土 阅读(1967) 评论(0) 推荐(0) 编辑
摘要: google面试题: 只能在堆上创建的对象,代码如下 class HeapOnly { public: void destroy() const { delete this; } private: ~HeapOnly(){}; }; int main() { //HeapOnly obj; HeapOnly *pobj =... 阅读全文
posted @ 2007-10-23 12:46 中土 阅读(1074) 评论(1) 推荐(0) 编辑
©2005-2008 Suprasoft Inc., All right reserved.