Question OOP-CTOR-0072
HardWhat does 'explicit' on a constructor prevent?
- A.
Implicit conversions, such as passing an int where the class is expected
- B.
Destruction
- C.
Sign up free to see the answer and a step-by-step explanation.
Popular companies
Prepare company by company
Hiring pattern, syllabus, past questions and mocks for each company.
All companiesPractice by subject
Constructors and Destructors question
What does 'explicit' on a constructor prevent?
Implicit conversions, such as passing an int where the class is expected
Destruction
Sign up free to see the answer and a step-by-step explanation.
Copying
Inheritance