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 |
I am developing a payroll system mini project.I used file concept in program for reading and writing.When the program is reloading into the memory that is if i execute next time the file was cleaned and adding data from the starting this is my problem.I want to strore the previous data and if i want to add any record that should be next of previous data.Please help me.
write a program in c++ to overload the function add (s1,s2) where s1 and s2 are integers and floating point values.
What is difference between abstraction and encapsulation?
What are the main differences between procedure oriented languages and object oriented languages?
9 Answers IBM, Infosys, Wipro,
How is exception handling carried out in c++?
What does no cap mean?
what is the basic concept of inheritance?
They started with the brief introduction followed by few basic C++ questions on polumorphism, inheritance and then virtual functions. What is polymorphims? How you will access polymorphic functions in C? How virtual function mechanism works?
Can anyone please explain runtime polymorphism with a real time example??at what ciscumstances we go for it??
What is object and example?
Hi All, I am new to programming and want to know how can i write a code to take input of 2 numbers from user and swap it without using a temp variable?
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