A simple test app:

cout << new int[0] << endl;

outputs:

0x876c0b8

So it looks like it works. What does the standard say about this? Is it always legal to “allocate” empty block of memory?

6 Answers
6

Leave a Reply

Your email address will not be published. Required fields are marked *