Adivce from the father of C++
2007-03-18 13:23
561 查看
[1] Avoid nontrivial pointer arithmetic
[2] Take care not to write beyond the bounds of an arrary;
[3] Use o rather than NULL
[4] Use vector and valarrary rather than bulit-in (C-style) arrarys
[5] Use string rather than zero-terminated arrarys of char;
[6] Minimize use of plain reference arguments
[7] Avoid void* except in low-level code
[8] Avoid nontrivial liternal(magic numbers) in code.Instead,define and use symbolic
[2] Take care not to write beyond the bounds of an arrary;
[3] Use o rather than NULL
[4] Use vector and valarrary rather than bulit-in (C-style) arrarys
[5] Use string rather than zero-terminated arrarys of char;
[6] Minimize use of plain reference arguments
[7] Avoid void* except in low-level code
[8] Avoid nontrivial liternal(magic numbers) in code.Instead,define and use symbolic
相关文章推荐
- Adivce from the father of C++II
- Adivce from the father of C++III
- Adivce from the father of C++
- Adivce from the father of C++
- recompiled header file is from a previous version of the compiler, or the precompiled header is C++
- C++: 为什么我们一般都要将函数的声明和定义分开?(separate the declaration of function from its definition)
- How do you copy the contents of an array to a std::vector in C++ without looping? (From stack over flow)
- 改写the father of c++ 写的计算器,只有源代码
- [Programming Visual C++]Chapter Five - The Lifetime of a GDI Selection
- C++ and The Perils of Double-Checked Locking: Part I
- Pointers, Arrays, and Structures(Chapter 5 of The C++ Programming Language)
- Elements of Programming Style -- The C++ Style Guide
- Share a peice of movie script from Rocky Ⅵ which I love the most.
- 1200057 - When creating or refreshing a Crystal Report from a BW query, the list of available SAP sy
- Namespaces and Exceptions(Chapter 8 of The C++ Programming Language)
- The database page size of 4096 bytes obtained from ASE is different from the database page size of 2
- How to change the background color of form using C++ - 如何用C++改变窗体的颜色
- 【LeetCode】19 Remove Nth Node From End of List (c++实现)
- 20 issues of porting C++ code to the 64-bit platform
- "The Design and Evolution of C++" 阅读笔记