define class pointer in c++
<pre><code>#include &lt;iostream&gt;
#include &lt;string&gt;
#include &lt;list&gt;
#include &lt;conio.h&gt;
using namespace std;

class people
{
public:

   people* p;
   int x;
   people();
};
people::people()
{
   p = NULL;
}
void main()
{

    people jax;
    jax.p-&gt;x = 1;

}
</code></pre>

<hr>

<p>i got this error</p>

<p>Unhandled exception at 0x00361419 in classarray.exe: 0xC0000005: Access violation writing location 0x00000004.</p>

<p>in this line
<code>jax.p->x = 1;</code></p>

<p>help me pls !</p>
