Can a copy constructor admit an object of the similar class , C/C++ Programming

Can a copy constructor admit an object of the similar class as parameter, rather than reference of the object?

Posted Date: 3/15/2013 5:19:40 AM | Location : United States





copy constructor admit an object of the similar class as parameter, rather than reference of the object?

A: No. This is specified in the definition of the copy constructor itself. It must generate an error if a programmer specifies a copy constructor along with a first argument which is an object and not a reference.

 

Posted by | Posted Date: 3/15/2013 5:20:01 AM


Related Discussions:- Can a copy constructor admit an object of the similar class , Assignment Help, Ask Question on Can a copy constructor admit an object of the similar class , Get Answer, Expert's Help, Can a copy constructor admit an object of the similar class Discussions

Write discussion on Can a copy constructor admit an object of the similar class
Your posts are moderated
Related Questions


depth description of the inside and outside typecasting

Multiple inheritance with a common base (Hybrid Inheritance) Inheritance is an important and powerful feature of OOP. Only the imagination of the person concerned is the limit.

Goal: Design a program that computes square matrix multiplication on GPU using CUDA. Write the code in C. In particular, your implementation should obey the following requiremen

Within software languages we have the ability to store information in mail boxes i.e. memory slots which are given names to represent the box. The naming rules are governed by the


In this project, you will write a software for the Registrar's office of a university called YouOIT to maintain information about students and courses at the university. The reg


When I develop a destructor, do I require to explicitly call the destructors for my member objects?