单项选择题
Class Stonewt is declared as follows.
class Stonewt
{
//some members
public:
Stonewt(double lbs);
Stonewt(int stn, double lbs);
Stonewt();
~Stonewt();
operator int() const;
operator double() const;
};
Which function will be invoked by the following line of code ?
wt = 120.0; //wt is an object of type Stonewt
A. Stonewt(double lbs);
B. Stonewt();
C. operator int() const;
D. operator double() const;
点击查看答案&解析
