0

Dynamic memory

i find dynamic memory very confusing. can somebody explain me what is dynamic memory, how to use it, why is it good to use dynamic memory?

4th Nov 2016, 9:36 PM
Yagami Light
Yagami Light - avatar
2 Respostas
0
do you mean dynamically allocate or deallocate memory on heap? in the simplest case, use pointer and new operator to allocate memory, delete operator to deallocate it. However , it has multiple potential issues, so it is better to know how to use smart pointers since C++11
4th Nov 2016, 9:43 PM
ding yiqiang
ding yiqiang - avatar
0
thank for the answer. i mean allocate., after making the answer i already found the answer :D but thanks anyway
4th Nov 2016, 10:14 PM
Yagami Light
Yagami Light - avatar