+ 2

When is dynamically allocating memory in heap particularly useful?

To me, it seems that it gets the program 'ready' by anticipitating the input. But how does that help the operation of the program?

4th Oct 2016, 10:13 PM
Eruel Santos
Eruel Santos - avatar
1 Réponse
+ 2
we can also use c++ program to accept picture as input..in such a case we have no idea how large the file would be...so we have to use dynamic memory allocation there..the main advantage of dynamic memory allocation is maximum size you can allot to a variable is the physical size of our computer
5th Oct 2016, 1:15 AM
Balaji Rs
Balaji Rs - avatar