[cs13001] Lab 9 question

Mikhail Nesterenko mikhail at cs.kent.edu
Wed Apr 20 09:04:20 EDT 2016


rs wrote:
> Which one explicitly invokes *copy constructor *for Myclass example in the
> slides?
> 1. Myclass obj1;
> 
> 2. Myclass obj2=obj1;

> 3. Myclass obj2(obj1);

^^^^^^^^^^^ this is an explicit invocation of a copy constructor: ob2
becomes a copy of ob1.

thanks,
--
Mikhail


More information about the cs13001 mailing list