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 level simply an object, and of course remove the line "level = new Level;" I get a runtime error, the reason being that level is then initialised on the first line, BEFORE initD3D and init_pipeline - the methods that set up the projection and view for use. You see the problem is that level uses these two things but when done first I get a null 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 initialising 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 Level level; arguments or not, you still have to initialise it at some point.</p>
