private member prob

Discussion in 'C++' started by Dave, Dec 1, 2003.

  1. Dave

    Dave Guest

    simple problem, sorry. I've got a class:

    class CDirect3DEngine
    {
    public:
    CDirect3DEngine();
    ~CDirect3DEngine();
    HRESULT InitD3D (HWND hWnd);
    ID3DXMesh* Mesh;
    private:
    CLoadOBJFile LoadOBJFile;
    LPDIRECT3D9 g_pD3D; //Direct3D object
    LPDIRECT3DDEVICE9 g_pd3dDevice; //Direct3D device
    LPDIRECT3DVERTEXBUFFER9 g_pvb; //Vertex Buffer
    LPDIRECT3DTEXTURE9 g_pTexture; //Texture
    };

    in the function InitD3D, it says g_pD3D is an undeclared identifier. Any
    ideas why?

    Also, another question. What would happen if i made a class but did not
    include the constructor and destructor declarations? I'm guessing they'd
    never get called, but what specifically would this cause?

    cheers
    dave
    Dave, Dec 1, 2003
    #1
    1. Advertising

  2. Dave

    Dave Guest

    ahhh got the solution. sorry guys, just a dodgy typo. not used to the whole
    case-critical code idea. ;)
    Dave, Dec 1, 2003
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. qazmlp
    Replies:
    19
    Views:
    792
    Daniel T.
    Feb 4, 2004
  2. DaveLessnau
    Replies:
    3
    Views:
    428
    Howard
    May 16, 2005
  3. Jeremy Bowers
    Replies:
    3
    Views:
    513
    Steven Bethard
    Jan 24, 2005
  4. Peng Yu
    Replies:
    3
    Views:
    1,078
    Simon Forman
    Sep 21, 2009
  5. ittium
    Replies:
    5
    Views:
    443
    88888 Dihedral
    Jan 12, 2012
Loading...

Share This Page