... 访问 (access to) 与非成员运算符 (and nonmember operators) 类,前向声明 (class, forward declaration of) ...
基于1个网页-相关网页
The Sales item class offers a good example of member and nonmember binary operators .
中给出了成员和非成员二元操作符的良好例子。
It defines one member operator and has three nonmember operators.
它定义了一个成员操作符,并且有三个非成员操作符。
Symmetric operators, such as the arithmetic, equality, relational, and bitwise operators, are best defined as ordinary nonmember functions.
对称的操作符,如算术操作符、相等操作符、关系操作符和位操作符,最好定义为普通非成员函数。
应用推荐