Questions of copy constructor
From: away (Gusalpine_at_spambs.com)
Date: 09/14/04
- Next message: Richard Herring: "Re: Writing 10"
- Previous message: JKop: "Re: size of object"
- Next in thread: Victor Bazarov: "Re: Questions of copy constructor"
- Reply: Victor Bazarov: "Re: Questions of copy constructor"
- Reply: Karl Heinz Buchegger: "Re: Questions of copy constructor"
- Reply: John Harrison: "Re: Questions of copy constructor"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 14 Sep 2004 14:16:01 GMT
1. When a class defined with a member of pointer type, it's necessary to
have a copy constructor and assignment operator.
If don't pass objects of such class as value in a function and don't do
assignment, should copy constructor and assignment operator be unnecessary?
2. If a base class have a pointer member, should its derived classes also
need copy constructor and assignment operator, no matter if a derived class
itself has a pointer member or not?
3. If such a pointer member of pointer type of "void", such void type can be
casted to any other type at runtime, how to code a copy constructor for such
a member?
Thanks for help!
- Next message: Richard Herring: "Re: Writing 10"
- Previous message: JKop: "Re: size of object"
- Next in thread: Victor Bazarov: "Re: Questions of copy constructor"
- Reply: Victor Bazarov: "Re: Questions of copy constructor"
- Reply: Karl Heinz Buchegger: "Re: Questions of copy constructor"
- Reply: John Harrison: "Re: Questions of copy constructor"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|