Crashing Pointer Array C++ : <p>Code::Blocks, Win7, C++</p>

<p>Hi, I'm creating an overview project for myself, and an integral part includes doing an Exchange Sort in descending order. I've created a simple trial run to test the concept.</p>

<p>Embarrassingly enough, I can't get past creating the array without the project crashing. This only happens when I create the array with pointers (My project's arrays are pointers, which is why I need this to work). The code compiles fine, but when I run it, I get a Window's notification that "ArrayTest.exe has stopped working"</p>

<p>When I print out each dereferenced value, I get:</p>

<p>"The original order: 1 13 5 7 2 "</p>

<p>When I print out each value's address, I get: </p>

<p>"The original order: 0x28ff08 0x28ffc4 0x760c8cd5 0x6aadab61 0xfffffffe "</p>

<p>The last address showed up when using an array length of 6, and crashes as well. Am I blind to a simple error in my code, or is this a hardware issue?</p>

<pre><code>//filename ArrayTest
#include &lt;iostream&gt;

using namespace std;

int main()
{
    int *j[5];
    (*j)[0] = 1;
    (*j)[1] = 13;
    (*j)[2] = 5;
    (*j)[3] = 7;
    (*j)[4] = 2;

    cout &lt;&lt; "The original order: ";
    for (int i = 0; i &lt; 5; i++)
    {
        cout &lt;&lt; (*j)[i] &lt;&lt; " ";
    }

     return 0;
}
</code></pre>
