如果我这样做,那是什么样的区别。
int *i = new int;
*i = 5;
*(i+1) = 20;
以及
int *i2 = new int [2];
i2[0] = 5;
i2[1] = 20;
I can access 以及use these 2 pointers the same way but what is the difference between these 2 examples 以及what errors can occur if I don t allocate enough memory, as in the first example?