99. Constructors-I

Question.4

A driver class has a single-argument constructor:

class UARTDriver {
public:
   UARTDriver(int baud) { /* setup */ }
};

void configure(UARTDriver drv) { /* ... */ }

configure(9600);  // Pass int where UARTDriver expected

Does configure(9600) compile?

Need Help? Refer to the Quick Guide below

Select Answer