注册 | 登录 忘记密码? 51cto首页 | 博客 | 论坛 | 招聘
热点文章 IT行业入门---兴趣当先
 帮助

TIPS FOR C++


2007-03-28 19:16:14
 标签:c++   [推送到技术圈]

[1]Avoid type fields;
[2]Use pointers and references to avoid slicing;
[3]Use abstract classes to focus design on the provision of clean interfaces;
[4]Use abstract classes to minimize interfaces;
[5]Use abstract classes to keep implementation details out of interfaces;
[6]Use virtual functions to allow new implementations to be added without affecting user code;
[7]Use abstract classes to minimize recompliation of user code;
[8]Use abstract classes to allow alternative implementations;
[9]A class with a virtual function should have a virtual destructor;
[10]An abstract class typically doesn't need a constructor;
[11]Keep the representations of distinct concepts distinct;


上一篇 TIPS FOR C++3  下一篇 REDHAT安装注意事项



    文章评论
 
2007-03-28 19:23:00
很不错的文章

 

发表评论

昵   称:
验证码:  点击图片可刷新验证码  博客过2级,无需填写验证码
内   容: