I wrote the following code snippet which resulted in compilation errors when executed on codepad.org
int main()
{
int *p = new int(5,6,7);
return 0;
}
I was passing 3 number of arguments to constructor of int while dynamically allocating memory for it.(which should not work according to me).
But when I executed the same code in visual studio 2010 compiler it is compiling and initializing the value with the last argument. Why is this working like this?