What does the line that I originally executed did?
GLfloat* points = new GLfloat(1024);
Let's try replacing GLfloat with int , you will see that if GLfloat is a type similar to int or float , you will get the following:
int * points = new int(1024);
The above statement means that you are creating a pointer to an int with an initial value of 1024 . Thus, in your case, this means creating a points pointer to a variable of type GLfloat and an initial value of 1024 .
This is equivalent to writing the following in the abbreviated version:
int * points = new int; *points = 1024;
See here for more details.
taocp source share