   ashamed to ask.....but have to know for sure.
  I am ashamed to ask, but I just *need* to check, my take on C++'s default copy constructor ( T(const T &obj) and default assignment operator (i.e. operator=(const T &obj) ) was this:both:  for each member of the class T, m_member, do:m_member=obj.m_member  and the default assignment operator is const T&operator=(const T &obj) and returns *this.note that what I believe is the default action is very, very different frommemcpy(this, &obj, sizeof(T));but what about the base class(es) of T, I *think* that the default copy constructor is just:for each base class T, Base, do: Base(obj) {this makes sense}and the assignment operator do: Base::operator=(obj)is this right?   
  Autogenerated copy constructors use the copy constructors of base and member classes:class foo : base1, base2, base3 {    bar m1;    baz m2;    int m3;};// behaves like (or at least very close to):foo::foo( const foo& source )    : base1( static_cast< const base1& >( source ) )    , base2( static_cast< const base2& >( source ) )    , base3( static_cast< const base3& >( source ) )    , m1( source.m1 )    , m2( source.m2 )    , m3( source.m3 ){}Terminology note:  The above :...,...,...,...,... syntax I'm using is called an initializer list (feel free to google this for more information -- basically, it uses/invokes constructors rather than assignment operators)Slightly different from simple assigment, but you got the general idea down at least.  Your statement holds true for operator=.  And yes, it's nothing like memcpy :).   ;  yes I know, for the copy constructor that is what I figured, and that is what I was thinking but got too lazy to write out for the constructor but what about the assignment operator? this is the one I am most wanting to check.   ;  The compiler generated assignment operator will call the assignment operators of all base classes (if any) and all member variables.   ;Quote:Original post by kRoguebut what about the assignment operator?Quote:Original post by MaulingMonkeyYour statement holds true for operator=.:)   