thanks jlb for bringing this to my attention, though i can definitely see how easier it is, but i want to learn all there is about c++, including practicing it, so i wanted to make pointers and maybe after making a basic pointer move onto the smart pointers (shared and unique), using the same code.
but if you can tell me how to allocate memory for my pointer, or if you can give me a good link to reference on how to allocate memory for an int, char, string or even a class?
and yes, definitely need to delete the pointer after done:
is that correct above?
i thought you would have to do that if you used the word "new" such as:
|
Vector2* a = new Vector2();
|
then that would make it a heap and not a stack, so you would have to manually delete it, and if its a smart pointer like a unique or shared, then you wouldnt need to delete correct?
again thanks again for your input :)