变量初始化规则
---整理自c++primer 4th version
如有错误,麻烦各位大侠指出
Caution:Uninitialized Variables Cause Run-Time Problems
Using an uninitialized object is a common program error, and one that is often difficult to uncover. The compiler is not required to detect a use of an uninitialized variable, although many will warn about at least some uses of uninitialized variables. However, no compiler can detect all uses of uninitialized variables.
Sometimes,we're lucky and using an uninitialized variable results in an immediate crashat run time. Once we track down the location of the crash, it is usually pretty easy to see that the variable was not properly initialized.
Other times, the program completes but produces erroneous results. Even worse, the results can appear correct when we run our program on one machine but fail on another. Adding code to the program in an unrelated locat