0

What can "new" do?

I can understand how it works

2nd Jan 2018, 7:43 AM
Paulliant
2 Answers
+ 15
new is used to allocate memory in c++ for class objects... the object's constructor is called after the memory is allocated. it stores in heap.. new & delete are dynamic memory operators the new is used to allocate memory & delete is used to deallocate... Good luck 😊
2nd Jan 2018, 11:48 AM
🌛DT🌜
🌛DT🌜 - avatar
+ 3
new creates a variable and stores it on the heap,a.k.a an object.Try using googke
2nd Jan 2018, 7:49 AM
᠌᠌Code X
᠌᠌Code X - avatar