How do I call the copy constructor? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
30th May 2020, 11:12 AM
PUFFIN Channel
PUFFIN Channel - avatar
5 Answers
+ 1
Copy constructor is called when initializing the object with another object, that is: ATM another_bank = bank; //Copy constructor is called.
30th May 2020, 12:18 PM
你知道規則,我也是
你知道規則,我也是 - avatar
0
CarrieForle, in what part of the code should I insert this?
30th May 2020, 12:22 PM
PUFFIN Channel
PUFFIN Channel - avatar
0
Any function (including main())
30th May 2020, 12:37 PM
你知道規則,我也是
你知道規則,我也是 - avatar
0
Have you tried inserting this into the code? I get a result that I received earlier. In addition I get an error message
30th May 2020, 12:44 PM
PUFFIN Channel
PUFFIN Channel - avatar
0
I made an sample. You can check it out: https://code.sololearn.com/cEBE4K9BCNK3/?ref=app
30th May 2020, 4:45 PM
你知道規則,我也是
你知道規則,我也是 - avatar