0
Can we assign objects of two different classes. Like obj1=obj2.
3 ответов
+ 4
I thought it wouldn't work without overloading the = operator, but I've checked and found out there is a generic = implemented. I've tested it, and it works.
= is the assignment operator by the way. If what you want is to test for equality, then you do have to overload the == operator.
+ 2
c++ compiler has a default = overload for classes that's why ...
+ 1
yes we can assign
like mr.zen said