In the following code fragment: 1. What object is/are being constructed? 2. From what they are being constructed? 3. Which constructor used?
Recall that a rational number has a numerator and a denominator (7/3), but not 3(1/2) or .96.
void f (Rational a);
void f (Rational & a);
inline Rational g (void)
//in some function..maybe main?
Rational y(4, 3);
Rational z = y;
x = g( );
- joeLv 62 years ago
Do your own homework and maybe, just maybe you will learn something!