Fundamental Programming Object-Oriented Concepts Beginner
Q Why must a C++ copy constructor take its parameter by reference, as in X(const X&)?
  • A Only for const-correctness
  • B Because constructors cannot take value parameters
  • C References are faster
  • D Passing by value would require calling the copy constructor itself, causing infinite recursion
Leave a Comment