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
Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4

Byteland county is very famous for luminous jewels. Luminous jewels are used in making beautiful necklaces. A necklace consists of various luminous jewels of particular colour. Nec

Consider text comprised of sentences and sentences comprised of words. Words in a sentence will be space delimited. Given a text and K strings, task is to find out the number valid

padovan string program 1 : package test.padovanstring; public class PadovanString {     public int stringOccurrences(int n, String str){        if(n >= 40)     return -

Based on the automobile's model year and weight, the city of Cebu determines the car's weight class and registration fee using the following schedule: Model Year Registration

Write a program to find the area under the curve y = f(x) between x = a and x = b, integrate y = f(x) between the limits of a and b. The area under a curve between two points can b

In this problem you are given a board in which some of the elements are placed as shown in diagram below. Each element represents a color. Fill the other elements in the board, suc

Project Description: Design and prepare software that can navigate a mobile robot using SLAM technique using vision sensor (camera). Skills required are C Programming, Engine

string will contain only lower case alphabet& the ascii value starts from 1-26,(ie,a=1&z=26).it perform the operation like the following costs:add=2units,replace=1unit,delete=3unit

FUNCTIONS It refers to a subprogram that is meant to do a certain task. It is basically used to execute a set of operations and return information to the main or calling functio