问题
单项选择题
如果定义了一个类myclass,则为myclass类对象以成员函数形式重载后++运算符的声明应该为( )。
A.myclass operator ++();
B.myelass& operator ++();
C.myclass operator++(in;
D.myclass& operator++(in;
答案
参考答案:C
解析: 运算符重载函数说明为类的成员函数的格式:<类名>operator<运算符>(<参数表>)