Calling Base class constructor

Home Forums C Programming Calling Base class constructor

This topic contains 0 replies, has 1 voice, and was last updated by  serkan 11 years, 1 month ago.

  • Author
  • #2001


    please see the following scenario.

    I have not writtent he body of the constructors. My question is I have not used the statement like derived(int _principal, int _year):base(_principal,_year)
    and declared the default constructor in the base class i.e. base(){} so the compliler is calling that default constructor while I create the derived class constructor. Is there any draw back in this procedure……….?
    Or always I sould call the constructor explicitly while creating the derived calss constructor and adding one more construcotor in the base class like this.

    Please suggest

You must be logged in to reply to this topic.