Is there a new/delete equivalent of realloc?



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

Post New Answer

More C++ General Interview Questions

Explain public, protected, private in c++?

0 Answers  


What happens if an exception is throws from an object's constructor and from object's destructor?

3 Answers   TCS,


Write about the members that a derived class can add?

0 Answers  


What is c++ used for in games?

0 Answers  


What is the use of data hiding?

0 Answers  






What is the difference between #import and #include in c++?

0 Answers  


Can I run c program in turbo c++?

0 Answers  


What are the two types of comments, and how do they differ?

0 Answers  


Is there any problem with the following: char *a=NULL; char& p = *a;?

1 Answers  


Describe Trees using C++ with an example.

0 Answers  


write a program that takes two numbers from user that prints the smallest number

2 Answers  


What are disadvantages of pointers?

0 Answers  


Categories