Assume that Base is the class name, and programmer has not written any copy constructor in that class.
Base c = b; //will this line calls copy constructor?
yes, but it calls compiler provided copy constructor.
Yes, but it calls compiler provided copy constructor. Because here we are creating a new object and then assigning it with an existing object, so it calls copy constructor. (if programmer doesn't provide one, then it calls compiler provided one).
Back To Top