Original Post
Well, I am working on my 2D game engine using SDL. I current have a class for the engine itself, the app. window, graphics class, simple sprite class, and a renderer. In the graphics class I have functions to perform all graphical operations, of course. Well, the "CEngineGfx::Render" function calls "m_pRenderer->Render", and "m_pRenderer" is "CRenderer *m_pRenderer;". Well, when I call "g_pGfx->Render" (defined as "CEngineGfx *g_pGfx = new CEngineGfx;"), I get an access violation. When I debug, it points to this code in 'CEngineGfx::Render': if (m_pRenderer) // <-- This Line :) m_pRenderer->Render(); Even if I use the 'CRenderer' object directly, by defining 'CRenderer *g_pRenderer = new CRenderer;' and call 'g_pRenderer->Render()' I get the same error. And the debugger says the expression for 'g_pRenderer' cannot be evaluated. I call 'new' and everything. I just can't figure out what's wrong. I hope I explained clearly, and I hope it's enough info. Thanks in advance, Matt U.