( 33 )将运算符 “ + ” 重载为非成员函数,下列原型声明中,错误的是A ) MyClock operator + (MyClock,long);B ) MyClock operator + (MyClock,MyClock);C ) MyClock operator + (long,long);D ) MyClock operator + (long,MyClock);

( 33 )将运算符 “ + ” 重载为非成员函数,下列原型声明中,错误的是

A ) MyClock operator + (MyClock,long);

B ) MyClock operator + (MyClock,MyClock);

C ) MyClock operator + (long,long);

D ) MyClock operator + (long,MyClock);


相关考题:

下面是重载为非成员函数的运算符函数原型,其中错误的是A . Fraction operator + (Fraction, Fraction);B . Fraction operator - (Fraction);C . Fraction perator = (Fraction, Fraction);D . Fraction operator += (Fraction, Fraction);

在下面的运算符重载函数的原型中,错误的是A.Volume operator-(double,double);B.double Volume::operator-(double);C.Volume Volume::operator-(Volume);D.Volume operator-(Volume,Volume);

( 33 )下列是重载乘法运算符的函数原型声明,其中错误的是A ) MyClass operator*(double,double);B ) MyClass operator*(double,MyClass);C ) MyClass operator*(MyClass,double);D ) MyClass operator*(MyClass,MyClass);

( 14 )将前缀运算符 “ -- ” 重载为非成员函数,下列原型中,能正确用于类中说明的是A ) Decr operator --(int);B ) Decr operator --( Decr,int);C ) friend Decr operator --(Decr);D ) frlend Decr operator --(Decr,int);

下列是重载乘法运算符的函数原型声明,其中错误的是A.MyClass operator * (double, double);B.MyClass operator * (double, MyClass);C.MyClass operator * (MyClass, double);D.MyClass operator * (MyClass, MyClass);

下列是重载为非成员函数的运算符函数原型,其叶错误的是()。A.Fraction operator+(Fraction,Fraction);B.Fraction operator-(Fraction);C.Fraction&operator=(Fraction&,Fraction);D.Fraction&operator+=(Fraction&,Fraction);

将运算符“+”重载为非成员函数,下列原型声明中,错误的是( )。A.MyClock operator+(MyClock,long);B.MyClock operator+(MyClock,MyClock);C.MyClock operator+(long,long);D.MyClock operator+(long,MyClock);

将x+y*z中的“+”用成员函数重载,“*”是友元函数重载应写为( )。 A.operator+(operator*(y,z))SX 将x+y*z中的“+”用成员函数重载,“*”是友元函数重载应写为( )。A.operator+(operator*(y,z))B.x.operator+(operator*(y,z))C.x.operator+(X*(y,z))D.x+(operator*(y,z))

下列是重载乘法运算的函数原型声明,其中错误的是A.MyClass operator*(double,double);B.MyClass operator*(double,MyClass);C.MyClass operator*(MyClass,double);D.MyClass operator*(MyClass,MyClass);

若要对类BigNumber中重载的类型转换运算符long进行声明,下列选项中正确的是( )。A) operator long()const;B) operator long(bigNumber);C) long operator long() const;D) long operator long(BigNumber);A.B.C.D.

下面重载乘法运算符的函数原型声明中错误的是( )A.TestClass operator *(MyClass,double);B.TestClass operator *(double,MyClass);C.TestClass operator *(double,double);D.TestClass operator *(MyClass,MyClass);

如果表达式y*x++中,“*”是作为成员函数重载的运算符,“++”是作为友元函数重载的运算符,采用运算符函数调用格式,该表达式还可表示为A.x.operator++(0).operator*(y);B.operator*(x.operator++(0),y);C.y.operator*(operator++(x,0))D.operator*(operator++(x,0),y)

将运算符“+”重载为非成员函数,下列原型声明中,错误的是( )。A.MyClockoperator+(MyClock,long);B.MyClockoperator+(MyClock,MyCloek);C.MyCloekoperator+(long,long);D.MyClockoperator+(long,MyCloek):

已知表达式++a中的“++”是作为成员函数重载的运算符,则与++a等效的运算符函数调用形式为A.a.operator++(1)B.operator++(A)C.operator++(a,1)D.a.operator++()

下面是重载为非成员函数的运算符函数原型,其中错误的是A.Fraction operator+(Fraction,Fraction);B.Fraction operator-(Fraction);C.Fraction perator=(Fraction,Fraction);D.Fraction operator+=(Fraction,Fraction);

下列运算符重载函数的原型错误的是( )。A.Volume operator-(double,double);B.double Volume::operator-(double);C.Volume Volume::operator-(Volume);D.Volume operator-(Volume,Volume);

下列是重载乘法运算符的函数原型声明,其中错误的是( )。A.MyClass operator*(double,double);B.MyClass operator*(double,MyClass);C.MyClass operator*(MyClass,double);D.MyClassoperator*(MyClass,MyClass);

MyClock 类的拷贝构造函数的声明语句为( )。A.MyClock(MyClock x)B.MyClock(MyClock x)C.MyClock(MyClock x)D.MyClock(MyClock *x)

MyClock为一个类,则指向“MyClock a,* p;”语句时,调用该类构造函数( )次。A.1B.2C.3D.4

将前缀运算符“--”重载为非成员函数,下列原型中能正确用于类中说明的是( )。A.DeCr&operator--(int);B.DeCr operator--(DeCr&,int);C.friend DeCr&operator--(DeCr&);D.friend DeCr operator--(DeCr&,int);

如果表达式++a中的“++”是作为成员函数重载的运算符,若采用运算符函数调用格式,则可表示为( )。 A.a.operator++(1)B.operator++( )C.operator++(a,1)D.a.operator++()

单选题将前缀运算符“--”重载为非成员函数,下列原型中,能正确用于类中说明的是(  )。ADeer operator--(int);BDeer operator--(Deer,int);Cfriend Deer operator--(Deer);Dfriend Deer operator--(Deer,int);

单选题下面是重载为非成员函数的运算符函数原型,其中错误的是(  )。AFraction operator+(Fraction,Fraction);BFraction operator-(Fraction);CFraction operator=(Fraction,Fraction);DFraction operator +=(Fraction,Fraction);

单选题将运算符“+”重载为非成员函数,下列原型声明中,错误的是(  )。AMyClock operator+(MyClock,long);BMyClock operator+(MyClock,MyClock);CMyClock operator+(1ong,long);DMyClock operator+(1ong,MyClock);

单选题下列是重载乘法运算符的函数原型声明,其中错误的是(  )。AMyClass operator*(double,double);BMyClass operator*(double,MyClass);CMyClass operator*(MyClass,double);DMyClass operator*(MyClass,MyClass);

单选题若要对类BigNumber中重载的类型转换运算符long进行声明,下列选项中正确的是()。Aoperator long()const;Boperator long(bigNumber);Clong operator long()const;Dlong operator long(BigNumber);

单选题如果表达式y*x++中,“*”是作为成员函数重载的运算符,“++”是作为友元函数重载的运算符,采用运算符函数调用格式,该表达式还可表示为(  )。Ax.operator++(0).operator*(y)Boperator*(x.operator++(0),y)Cy.operator*(operator++(x,0))Doperator*(operator++(x,0),y)