Undeclared Identifier 
Author Message
 Undeclared Identifier

Hi

MSVC++ V5

When I create a new dialogue box for an app and give it a new class it
creates the following code with class wizard:

class CInputBox : public CDialog
{
public:
        CInputBox(CWnd* pParent = NULL);  
                enum { IDD = IDD_DIALOG1 };
                protected:
        virtual void DoDataExchange(CDataExchange* pDX);    
protected:
DECLARE_MESSAGE_MAP()

Quote:
};

However the line "enum {IDD=IDD_DIALOG1};" generates an UNDECLARED
IDENTIFIER error at build time. I do not understand this. I thought it was
a declaration. So where and what does it want? I thought Class Wizard would
do it for me.

regards
Peter Davy (New Zealand)
--

--



Fri, 01 Sep 2000 03:00:00 GMT  
 Undeclared Identifier

Hi Peter,

This is a result of removing the #include "appname.h", that appears right
under #include "StdAfx.h", from the .cpp file that ClassWizard created.  Or
by removing the #include "resource.h" from the applications main header
file.  This can be fixed  by either replacing the #include in the .cpp,
adding the #include "resource.h" in the header file or replacing the
#include "resource.h" in the main header file.

HTH
--
===================
Frank Hickman
Computers Plus


===================



Fri, 01 Sep 2000 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. 'mmapset' : undeclared identifier;'time_t' : undeclared identifier

2. Strange error "undeclared identifier" and HCRYPTPROV

3. error C2065: 'sqrt': undeclared identifier

4. undeclared identifier error

5. ODBC_CONFIG_SYS_DSN undeclared identifier

6. error C2065: 'DIID__IMessangerEvents' : undeclared identifier

7. error C2065: DBFILETIME undeclared identifier

8. CoInitializeEx(NULL,COINIT_MULTITHREADED) undeclared identifier

9. error C2065: '_com_dispatch_method' : undeclared identifier

10. undeclared identifiers error if #include another .h file!

11. 'AfxConnectionAdvise' : undeclared identifier

12. 'swprintf' : undeclared identifier during release build

 

 
Powered by phpBB® Forum Software