摘要: #include using namespace std;#define DESTROY_POINTER(ptr) if (ptr) { delete ptr; ptr = NULL; } class Product{public: virtual void Action()=0;};clas... 阅读全文
posted @ 2014-12-11 11:08 stanley19861028 阅读(102) 评论(0) 推荐(0) 编辑
摘要: #include using namespace std;class Product{public: virtual ~Product() {} virtual void Action()=0;};class ConcreteProduct : public Product{public... 阅读全文
posted @ 2014-12-11 09:31 stanley19861028 阅读(105) 评论(0) 推荐(0) 编辑