Saturday, 2 July 2016

c++ - Why or when to declare an int with a pointer?

Is there any difference between these two other than their duration?



int ptr;
int *ptr = new int;



I understand the concept of pointers but I don't see a much of a use for for delcaring an int with a pointer.

No comments:

Post a Comment