A
al
string s = "original string";
s = "new string";
s.assign("another new string");
Is there any difference using above two way to assign a new string to s?
class Derived : public Base
{
};
Base b;
Derived d;
list<Base> mylist;
mylist.push_back(d);
Is assignment operator called? If true, whose operator is called, Base's or
Derived's?
b = d;
Whose assignment operator called, Base's or Derived's?
Thank you very much!
s = "new string";
s.assign("another new string");
Is there any difference using above two way to assign a new string to s?
class Derived : public Base
{
};
Base b;
Derived d;
list<Base> mylist;
mylist.push_back(d);
Is assignment operator called? If true, whose operator is called, Base's or
Derived's?
b = d;
Whose assignment operator called, Base's or Derived's?
Thank you very much!