
Be Careful When Assigning Data Members During Initialization
Be careful how you assign data members during initialization. For example, consider the following code: class test{ public: test (int y) : j (y), i(j) { } private: int i; int j;}; When compiled, the compiler interprets that as: test (int y){ i = j; j = y;} Because the