A simple test app:
cout << new int[0] << endl;
outputs:
0x876c0b8
So it looks like it works.
I guarantee you that new int[0] costs you extra space since I have tested it.
For example, the memory usage of
int **arr = new int*[1000000000];
is significantly smaller than
int **arr = new int*[1000000000];
for(int i =0; i < 1000000000; i++) {
arr[i]=new int[0];
}
The memory usage of the second code snippet minus that of the first code snippet is the memory used for the numerous new int[0].