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
Aim: To implement a program to convert time in 24 hour format to 12 hour format. Code:                       #include #include #include class time24 {


Within software engineering, software is very rarely written by a single software engineer. Usually a team of engineers write a program; therefore a formal structural design approa

Destructor: The purpose of destructor is to free the memory when the compiler memory is reduced or not enough to execute certain program. Sometimes there may several objects op

Write a function that takes in a radius and evenly covers the screen with circles of that radius. Don't attempt to draw any circles that are completely off the screen.


Pebble Merchant Problem Description There is a pebble merchant. He sells the pebbles, that are used for shining the floor. His main duty is to take the length of the room’s sides

Your program will read two kinds of data from two files: names and predicates. It will read a formal expression from standard input and check whether that expression is syntactical


A string is said to be "Beautiful"€, if it contains only non repetitive alphabets