Advertisement

Argh, can't find the reason of this error..

Started by May 13, 2001 03:27 AM
1 comment, last by richardve 23 years, 8 months ago
Hmm, got a little prob with my app: I''ve got a file Mesh.cpp and a file with the program starting point Main.cpp App is a class wich is defined in a header and included in Main.cpp "extern App* pApp" can be found in stdafx.h Now I want to do this:
  
void cMesh::Render(unsigned long dwFlags)
{
  // Blablablah

  cDevice3D*  pDevice3D;

  pDevice3D = dynamic_cast<cDevice3D*>(pApp->QueryDevice(pApp::DEV_3D));

  // ..

  
Now when compiling that stuff, I''m getting this error: "error C2653: ''pApp'' : is not a class or namespace name" But it really is a class and it is defined.. Does someone know what''s the prob with the code? I can''t see something wrong about it...
No, pApp is no class, it's a pointer to an object (I assume). And the member DEV_3D is an enum or so, am I right?
So if pApp is declared as

CApplication *pApp;

try using

      pDevice3D = dynamic_cast<cDevice3D*>(pApp->QueryDevice(CApplication::DEV_3D));  


That could work.

Edited by - VolkerG on May 13, 2001 5:08:04 AM
Advertisement
Ah, thx!

Yeah, DEV_3D is an enum and "pApp::" was a big typo



Bah, normally I never make typos..

*smacks head against wall

This topic is closed to new replies.

Advertisement