I have a pointer to an array of integers...
double* three = new double[10];
for(int i = 0; i< 12;i++)
{
three[i] = i+1;
}
I assign i+1 to each place in 'three'...when I debug the code, I cannot see the values inside 'three' like in C#..it just shows me the very first element in the array which is always 1!
Also why doesn't the above code throw an exception because surely when I am saying loop 12 times, I have only declared space for 10 ints?
Anyone shed a bit of light on this for me...if you can point me to some good literature about this sort of thing in C++ I would be most grateful, thanks.