Copy constructor | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 7

Copy constructor

Is it necessary that copy constructor argument should be const in C++?

21st Jun 2017, 3:48 AM
Keep in mind 😎
Keep in mind 😎 - avatar
2 Answers
+ 5
Thanks I get it
21st Jun 2017, 4:23 AM
Keep in mind 😎
Keep in mind 😎 - avatar
+ 2
id assume so. this way the values of the parameter cannot be changed during the copy.
21st Jun 2017, 4:23 AM
Michael Szczepanski
Michael Szczepanski - avatar