+ 1
what is dynamic memory???
2 Respostas
+ 3
It's memory allocated at run time, on the heap. Use new to create an object dynamically, and delete to free the memory.
Example:
int *ans = new int(42);
cout << *ans << endl;
delete ans;
+ 1
the memory used while program is running called as dynamic memory