You are here:

C++/what is the diffrence b/w a constructor and a Member function

Advertisement


Question
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

Answer
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.

C++

All Answers


Answers by Expert:


Ask Experts

Volunteer


rakshitha

Expertise

Difficult questions related to C .

Experience

C ,vc ,opc ,windows CE, ActiveX

Education/Credentials
Masters in electrical engineering

©2016 About.com. All rights reserved.