It's a good habit to initialize all members in a constructor's initialization list.
Sometimes you have multiple constructors in a class, and you have many many members to initialize, you may not want to list them all for each constructor, because if you want to change one member's initialized value, you have to go through all constructors' lists.
Then I found you can use preprocessor:
Very convenient! Just want to share this with youCode:#define INI x(0),y(0) class B{ private: int x,y; public: B():INI{} B(int z):INI{} ~B(){} void print(){cout<<x<<"\t"<<y<<endl;} };