Assume that Thing is a user-defined class, and consider the following function.
Thing f(Thing& A) { Thing B; B.x = A.x; return B; }
Where in this code will a copy constructor be used?
Consider the following class outline for a user-defined implementation of real numbers.
class RealNumber { ... RealNumber( float x ); RealNumber( float x, float y=0 ); };
What, if anything, is wrong with the outline?
Consider the class outline below.
class Stack { ... explicit Stack( int n ); };
What is the purpose of the explicit in this outline?