Ask your own question, for FREE!
Computer Science 15 Online
OpenStudy (anonymous):

what does new do in C++? related to dynamic memory allocation please help me?

OpenStudy (rsmith6559):

http://www.cplusplus.com/doc/tutorial/dynamic/

OpenStudy (anonymous):

Often, we do not know the size of an array at compile time. Allocate memory dynamically in a program using new.But in C++, memory needs to be reclaimed using delete. Frequently used technique in class members to allocate variable sized data structures – arrays of unknown size, e.g. a stack class with user-specificed number of elements – allocate space on a per request basis, e.g. allocate a buffer/memory to receive messages (http requests) from a construct..if you are still in confusion between static and dynamic memory allocation just lokk over this.. -Dynamically allocated memory is kept on the memory heap (also as the free store) -Dynamically allocated memory can't have a "name" it must be referred to -Declarations are used to statically allocate memory, the new operator is used to dynamically allocate memory

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!