SyntaxFix
Write A Post
Hire A Developer
Questions
In C/C++, pointers and arrays are (almost) equivalent. int *a; a[0]; will return *a, and a[1]; will return *(a + 1)
int *a; a[0];
*a
a[1];
*(a + 1)
But array can't change the pointer it points to while pointer can.
new int[n] will allocate some spaces for the "array"
new int[n]