A constructor is used to initialize an object when the object is created. If you do ahura a; a is created and the default constructor is used. You never call the constructor on an already existing object so a = f2(); can't use a constructor. Instead it uses operator=.