Effective C++:条款04:确定对象被使用前已先被初始化 (Make sure that objects are initialized before they're used.)
为内置型对象进行手工初始化,因为C++不保证初始化它们。
构造函数最好使用成员初值列(member initialization list),而不要在构造函数本体内使用赋值操作(assignment)。初值列列出的成员变量,其排列次序应该和它们在class中的声明次序相同。
为免除“跨编译单元之初始化次序”问题,请以local static对象替换non-local static对象。
---------------------------------------------------------------------------
You got a dream
You gotta protect it
People can't do something themselves
They wanna tell you you can do it
If you want something
Go get it
You got a dream
You gotta protect it
People can't do something themselves
They wanna tell you you can do it
If you want something
Go get it