假定M是一个类名,且M中重载了操作符=,可以实现M对象间的连续赋值,如“m1=m2=m3;”。重载操作符=的函数原型最好是()。

A.int operaotor=(M); B.int operator=(M&); C.M operator=(M&); D.M& operator=(M);

时间:2023-11-20 15:08:33

相似题目