Can you people give me some more than two reasons why constructors should use Initialization lists or Assignment operator ?
Two reasons are
ex. class MyTest;
MyTest :: MyTest(): obj(p)
MyTest :: MyTest()
1. In assignment operator case, one extra by default ctor will be called.
2. In Assignment operator case, a temporary variable is created and assigned to p and
then that temporary variable is passed to obj. Means extra temporary variable
creation in case of assignment operator.
Can you give me other reason except these two? This is question asked to me some C++ comptetion ?