this is my CDlg32.cpp
Code:
#include <windows.h>
#include "CDlg32.h"
namespace Joel {
class CDlg32 {
private:
HINSTANCE hInstancia;
HWND hDlg;
int nDLG;
public:
CDlg32();
~CDlg32();
protected:
};
}
Now, CDlg32.h:
Code:
#if !defined(_CDLG32_H)
#define _CDLG32_H
CDlg32::CDlg32() : hInstancia(NULL), hDlg(NULL), nDLG(0) {}
#endif
Now main.cpp
Code:
#include <windows.h>
#include "CDlg32.h"
using Joel::CDlg32;
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd) {
return 0;
}
Returns this errors.
CDlg32.h(4) : error C2871: 'Joel' : does not exist or is not a namespace
CDlg32.h(6) : error C2653: 'CDlg32' : is not a class or namespace name
CDlg32.h(6) : error C2550: 'CDlg32' : constructor initializer lists are only allowed on constructor definitions
CDlg32.h(6) : warning C4508: 'CDlg32' : function should return a value; 'void' return type assumed
main.cpp(4) : error C2653: 'Joel' : is not a class or namespace name
main.cpp(4) : error C2873: 'CDlg32' : symbol cannot be used in a using-declaration