Is there a new/delete equivalent of realloc?
Answer / rohit sah
No. It would have a number of difficult problems. Some of these are:
- Should the old instances in the memory be deleted and re-instantiated?
- How about contained classes?
- How about instances owned by the classes to be reallocated? These often have a pointer to their owner.
| Is This Answer Correct ? | 0 Yes | 0 No |
Why do we use classes in programming?
Can you please explain the difference between static and dynamic binding of functions?
What is the purpose of extern storage specifier?
What is the difference between public and private data members?
What is a template in c++?
What is the use of seekg in c++?
program to print this triangle * * * * * *
What does count ++ do in c++?
What are smart pointer? Whats its use?
What does catch(…) mean?
Explain friend class?
Given the following seqment of code containing a group of nested if instructions: y = 9; if ((x==3) || (x == 5)) y++; else if (x == 2) y *= 2; else if (x == 4 ) y-= 7; else y = 8; Enter a segment of code (without any IF statements) that does exectly the same thing using the switch structure.