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

Function Templates Function templates give you with the capability to write a one function that is a skeleton, or template, for a family of similar functions. In function ov

smugglers are becoming very smart day by day. Now they have developed a new technique of sending their messages from one smuggler to another. In their new technology, they are send

Is there any difficulty with the following : char*a=NULL; char& p = *a;? A: The result is indeterminate. You must never do this. A reference has to always refer to some object.

a padovan string p(n) for a natural number n is defined as p(0)=''x'' p(1)=''y'' p(2)=''z'' p(n)=p(n-2)+p(n-3),n>2

i have a project in BDD(Binary Decision Diagram).. where i have to use BDD library...i m using cudd package which uses BDD technique...i download cudd package..try to run in vc++ 6

write a atm program in c with inbuilt functions for 1782?

What does ODBC do in context with PHP? PHP supports many databases such as dBase, Microsoft SQL Server, Oracle, etc. however, it also supports databases such as filePro, FrontB

A palindrome is a string that reads the same from both the ends. Given a string S convert it to a palindrome by doing character replacement. Your task is to convert S to palindrome

I am an online tutor who can teach computer science and programming language. Is there any requirement for this?