一些代码实在不能理解,请教高手指点。
class IntArray {
public:
// equality and inequality operations: #2b
bool operator==( const IntArray& ) const; //**********
bool operator!=( const IntArray& ) const; //**********
// assignment operator: #2a
IntArray& operator=( const IntArray& ); //**********
int size() const; // #1
void sort(); // #4
int min() const; // #3a
int max() const; // #3b
// if the value is found within the array,
// return the index of its first occurrence
// otherwise, return -1
int find( int value ) const; // #3c
private:
// the private implementation
};
带“**********”注释的3行,怎么理解?
问题点数:20、回复次数:2Top
1 楼seashoreboy(海滨)回复于 2002-05-07 11:47:43 得分 5
不就是运算符重载吗?Top
2 楼bookwormc(Kai)回复于 2002-05-07 12:13:33 得分 15
The program is overloading the operators "==","!=" and "=".Top




