How do I call the copy constructor? | Sololearn: Learn to code for FREE!

0

How do I call the copy constructor?

https://code.sololearn.com/cndT78LNPNdU/?ref=app

5/30/2020 11:12:51 AM

PUFFIN Channel

5 Answers

New Answer

+1

Copy constructor is called when initializing the object with another object, that is: ATM another_bank = bank; //Copy constructor is called.

0

CarrieForle, in what part of the code should I insert this?

0

Any function (including main())

0

Have you tried inserting this into the code? I get a result that I received earlier. In addition I get an error message

0

I made an sample. You can check it out: https://code.sololearn.com/cEBE4K9BCNK3/?ref=app