why the argument is passed by reference to a copy
constructor?example?
Answers were Sorted based on User's Feedback
Answer / ashponni
Compliler runs out of memory,by creating copies of object
| Is This Answer Correct ? | 10 Yes | 0 No |
Answer / vishwa
we are creating a copy of the data , so it is better to get
the data directly from the original object, reference
mechanism provides us above. so we use the reference object
and also to restrict the change to original object we also
pass the reference as const.
| Is This Answer Correct ? | 4 Yes | 0 No |
What is difference between #define and const?
What is the example of polymorphism?
There are two base class B1,B2 and there is one class D which is derived from both classes, Explain the flow of calling constructors and destructors when an object of derived class is instantiated.
what is the diffrence between c# and c++
What does I oop mean?
IN PROGRAMING LANGAUGE A C++ IS PURELY OBJECT ORIENTED OR NOT?
How compiler selects(internally) required overridden function in inheritance?
2 Answers CSC, Infinite Computer Solutions,
should we use linear search or binary search if elements are placed in random order or mixed?in both cases? i need a little bit detail ans?thnks
i am getting an of the type can not convert int to int *. to overcome this problem what we should do?
#include <iostream> using namespace std; struct wow { int x; }; int main() { wow a; wow *b; a.x = 22; b = &a; a.x = 23; cout << b->x; return 0; }
why destructor is not over loaded?
Which is better struts or spring?