In C++, it is always confused between the initialization of a pointer to array and a pointer to a single variable, for example:
int *ip = new int(10);
ip points to a single integer initialized with the value 10.
int *ip = new int;
ip points to an array of 10 integers.
© 2020 Digcode.com. All rights reserved.