TIPS FOR C++
2007-03-28 19:16
375 查看
[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;
[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 Optimizing C/C++ Code
- Compiling, Linking and Debugging Tips for C++
- TIPS FOR C++3
- TIPS FOR C++
- Debugging Tips and Tricks for C++ in Visual Studio
- 《Tips for Optimizing C/C++ Code》译文
- Three Optimization Tips for C++
- C++优化三板斧:Three Optimization Tips for C++
- 《Tips for Optimizing C/C++ Code》译文
- Tips for Optimizing C/C++ Code
- [C/C++] - Tips for Better Coding Style
- [Memo] Tips and Tricks for using C++ I/O.
- [C/C++] - Tips for STL and Generic Programming
- TIPS FOR C++
- 《Tips for Optimizing C/C++ Code》译文
- GDB Tutorial: Advanced Debugging Tips For C/C++ Programmers
- Dijkstra's Shortest Path - C++ for C Programmers 2.5
- Some tips for using CCS
- Microsoft Visual C++ 2005 Express Edition Programming for the Absolute Beginner
- 用 IAR C/C++ For ARM 编写嵌入式应用的启动细节[转]