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
Define the Meaning of Call by reference? In "call-by- reference", as an alternative of passing the value of a variable, the location number (or the address) of the variable is

Define Automatic storage classes - computer programming? The Variables declared within function bodies are automatic by default and automatic variables are declared inside a fu

You are setting up an information system for a DVD Rental Company called Box office. The new system need to hold information about customers and DVDs rentals, payments and fines. C

C program to reverse the elements of array: #define rows 3 #define cols 3 void main() {                 int i=0,j=0;                 int arr[rows][cols];

For your class to work properly, you'll need to define appropriate constructors, extract and insert operators, and of course arithmetic operators. (If you wanted to use it as a gen

#include #include #include using namespace std; #define MAX 5 #define INF (1 #define DEBUG if(0) #define pii pair #define pb(x) push_back(x) class

types of lists

#include long BixFunction(int x, int y = 5, float z = 5) { return(++x * ++y + (int)++z); } int main() { cout return 0; }

HOW TO USE POINTER

If quicksort is so quick, why bother with anything else? If bubble sort is so bad, why even mention it? For that matter, why are there so many sorting algorithms? Your mission (sho