all right guys i got it, thank you very much for your time and a special thanks to Salem, i'll follow the RULES from now on :-)
Type: Posts; User: uriel228
all right guys i got it, thank you very much for your time and a special thanks to Salem, i'll follow the RULES from now on :-)
so why the next code compiling?
#include<iostream>
using namespace std;
int main()
{
int*ptr=new int[0];
*ptr=976;
cout<<*ptr<<endl;
system("pause");
thanks for the answer Sebastiani, but i don't think you right because the output of the next code:
#include<iostream>
using namespace std;
int main()
{
int*ptr=new int[0];
cout<<ptr<<endl;...
hi everyone:
what the meaning of
int*ptr=new int[0];?
it's compiling, and there isn't a run time error,
so what's the different between that and new int[1] or new int?
thanks alot