class with no constructor forces the use of a pointer type?
<p>I don't want to use pointers when I don't have to, but here's the problem: in the code below if I remove the asterisk and make <code>level</code> simply an <code>object</code>, and of course remove the line <code>level = new Level;</code> I get a runtime error, the reason being that <code>level</code> is then initialized on the first line, BEFORE <code>initD3D</code> and <code>init_pipeline</code> - the methods that set up the projection and view for use. You see the problem is that <code>level</code> uses these two things but when done first I get a <code>null</code> pointer exception. </p>

<p>Is this simply a circumstance where the answer is to use a pointer? I've had this problem before, basically it seems extremely vexing that when a class type accepts no arguments, you are essentially initializing it where you declare it.... or am I wrong about this last part?</p>

<pre><code>Level* level;

D3DMATRIX* matProjection,* matView;

//called once
void Initialise(HWND hWnd)
{
initD3D(hWnd);
    init_pipeline();

level = new Level;
}
</code></pre>

<p>I'm coming from c# and in c#, you are simply declaring a name with the line <code>Level level</code>; arguments or not, you still have to initialize it at some point.</p>
