C
ccs
In Meyers' book he gave an example of "virtual copy constructor", which is
quite different to an "ordinary" copy constructor by:
1. it returns a pointer to an object instead of a reference.
2. it have empty argument list.
3. it has "virtual" keyword in front of it.
My questions are:
1. How could "virtual" be used in front of a constructor even though it's a
"copy constructor"?
2. Can an "ordinary" copy constructor be "virtual?
Thanks in advance!
quite different to an "ordinary" copy constructor by:
1. it returns a pointer to an object instead of a reference.
2. it have empty argument list.
3. it has "virtual" keyword in front of it.
My questions are:
1. How could "virtual" be used in front of a constructor even though it's a
"copy constructor"?
2. Can an "ordinary" copy constructor be "virtual?
Thanks in advance!