//xxxoperator.cpp #include class Cat { public: Cat( ) { cout << "..miao.."; } Cat(const Cat& x) { cout << "..copy.." << endl;} Cat&operator=(const Cat& x) { cout << ".. assignment op.." << endl; return *this; } }; int main( ) { Cat x, y; cout << "=== ===" << endl; x = y; cout << " ------ " << endl; Cat xxx = y; cout << "***bye" << endl; return 0; }