Ray's playground

 

2011年6月7日

Item 3:Never treat arrays polymorphically.(More Effective C++)

摘要: 1#include<iostream>23usingnamespacestd;45classBST6{7private:8inta;910public:11BST(intn):a(n){};12intgetData(){returna;}13friendostream&operator<<(ostream&os,BST&bst);14};1516ostream&operator<<(ostream&os,BST&bst)17{18cout<<bst.getData();19returnos;20}2 阅读全文

posted @ 2011-06-07 18:02 Ray Z 阅读(397) 评论(0) 推荐(0) 编辑

导航