3

By mistake i forgot to enter the size of the array and wrote something like

int* ptr = new int[];

I was surprised when the code compiled. So, now since it compiled; could anyone let me know what is the meaning of this? it is creating an array of size?

lifeOfPi
  • 178
  • 1
  • 12

1 Answers1

0

As far as I can tell from looking at the disassembly, this is just a non-standard way of saying int* ptr = new int[0]; (see here for what that means).

Community
  • 1
  • 1
Robert Prévost
  • 1,667
  • 16
  • 22