c++中的怪问题。(我以前从来没见过)
有关运算符重载
class byte
{
unsigned char b;
public;
byte(unsigned char B = 0):b(B){}
const byte operator + (const byte & right) const
{
return byte(b+right.b);
}
/*......
省略n多运算符重载函数
......*/
#define TRY2(op) \ //这个宏定义什么意思?
out << "b1 = ";
b1.print(out);\ //‘/’符号有什么用?
out << "b2 = ";
b2.print(out);\
(b1 op b2).print(out);\
out <<endl;
b1 =9;b2 =47;
TRY2(+) TRY2(-) TRY2(*) TRY2(/) //什么意思呀?
//......
}
高手请赐教。