C++/what is the diffrence b/w a constructor and a Member function
Well my Question is that as a constructor perform same functioning as a member function so what is the need of using a constructor instead of a Member function how a constructor make coding easy
Constructor is automatically called at the creation of the object. If no constructor is provided then a defalut constructor is called.
Member function is not called at the object creation. It is called once the object is created. Hope I answered calirified your doubt. If not please reply me.