Results 1 to 2 of 2

Thread: Does default constructors gets created in all scenario

  1. #1
    Expert Member
    Join Date
    May 2006
    Answers
    114

    Question Does default constructors gets created in all scenario

    I want to know if in the case of there are no user defined default constructors will the compiler generate default constructor in all situations. If there are situations in which compiler would not create default constructor let me know about it


  2. #2
    Contributing Member
    Join Date
    May 2006
    Answers
    85

    Re: Does default constructors gets created in all scenario

    No there are situations in which default constructors would not be created. One of which I am aware of is if the class has constant type members say constant private members then compiler would not create default constructors for these and error would result if there is no user defined constructors defined for these.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact