# Unhandled exception at 0x009F1E7B in code.exe: 0xC0000005: Access violation reading location 0x990EC60C

0

So, I'm a little newbie about c++ but I know some basics. So I have a tridimensional matrix p whit full with hex values. So if I do somenthing like this:

``````for (int i = 1; i <= 10; ++i)
{
somefunction1(something, p[i]);
somefunction2(something, p[i]);
}
``````

and the i is incremented automaticaly to 10, evreything works fine. but, if I do something like this:

`````` for (int i = 10; i>=10; --i)
{
somefunction1(something, p[i]);
somefunction2(something, p[i];
}
``````

I get the error above. If I do the same thing but with I from 9, evreything works grate. An other thing that I have noticed, if I print the matrix my ten value is an 'a' 10 in base 16.

``````i=9
p=ac p=19 p=28 p=57
p=77 p=fa p=d1 p=5c
p=66 p=dc p=29 p=0
p=f3 p=21 p=41 p=6e

i=a
p[a]=d0 p[a]=c9 p[a]=e1 p[a]=b6
p[a]=14 p[a]=ee p[a]=3f p[a]=63
p[a]=f9 p[a]=25 p[a]=c p[a]=c
p[a]=a8 p[a]=89 p[a]=c8 p[a]=a6
``````

As you have noticed every single pointer is a number except when I is incremented to 10.

So I'm guessing the problem is tht when I'm trying to use p I get this erroe because p was not initialized. Because I have a 'p[a]' not a 'p'. I also tried whit '0xa', same error. How cand I solve this issue?

hex