+ 2
I don't understand what "new int" is supposed to do
3 odpowiedzi
+ 3
int * var = new int;
Allocates memory for variable of integer type.
+ 4
int is the data type of the variable
and new is the keyword to create an object or variable of a fundamental data type
+ 2
it obtains memory from the operating system and returns a pointer to its starting point