Hello everyone,
Sometimes, we allocate array of zero elements. I am wondering for what regualr purpose will we do that?
I have tested that in Visual Studio 2008, it runs ok.
thanks in advance,
George
Sometimes, we allocate array of zero elements. I am wondering for what regualr purpose will we do that?
I have tested that in Visual Studio 2008, it runs ok.
Code:
int main()
{
char* buf = new char [0];
delete[] buf;
return 0;
}
thanks in advance,
George