I have a query regarding constructor and destructor.
How accessibility of constructor and destructor affects the scope and the visibility of their class.
If someone give some explaination on this I will be thankful.
It doesn't. The accessibility of a class's constructors and destructor only affects whether and under what conditions you can create instances of the class (specifically you can only directly create instances of the class if at least one of the constructors is accessible to you and you can only create … Read More
I think the easiest way to understand is to understand where Constructors and Destructors come from. Back in the days of C you did not have classes, only structs. As such you had to write a function that would create your struct (and usually return a pointer to it) as … Read More