Quote Originally Posted by 2kaud View Post
Yes - in this case. But why not get into the habit of always using new/delete - or even better unique_ptr/shared_ptr.
Well, if i told you that i just understood the meaning of smart pointers would you believe me I couldn't see why you need a pointer that will get free automatically when you reach out of scope but with this code now i got it.