I am beginner with C++ and I want to know. When do I use new and delete keywords? And what can I use them to do? If anyone has any website that has a challenge to do with new and delete please post the link! . The only thing I know about the new keyword and delete is that you can do this:
And more . . .Code:int Size = 5; int *ptr = new int(Size); cout << *ptr << endl; delete ptr;
But when do you use this keywords? I am just curios about them and want to now if them can be really effective to use. Thanks for replies!