Home Forums C Programming Calling Base class constructor

Viewing 0 reply threads
  • Author
    Posts
    • #2001
      serkan
      Participant

      Hi,
      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
       

Viewing 0 reply threads
  • The forum ‘C Programming’ is closed to new topics and replies.