Hello All,
Small console code crashing when it reach to enum (T12::a4) variable. Same thing works fine on GUI.
error message:
(First-chance exception at 0x0F3FCAB4 (msvcr100d.dll) in ConsoleApplication2.exe: 0xC0000005: Access violation reading location 0x00000000.
If there is a handler for this exception, the program may be safely continued.)
Code:
funA()
{
char one[100] = "7a-11-2";
char two[100] = "19.32";
char three[25] = "hello";
char four[25] = "hello";
m_pVar = new T12::CClassA(two, one, three, four, T12::a4);
}
enum.h
Code:
namespace T12
{
enum em { a1 = 0, a2 = 1, a3 = 2, a4 = 3};
}
.h
Code:
namespace T12
{
CClassA
{
public:
CClassA(const std::string& two, const std::string& one, const std::string& three, const std::string& four, em eVar);
};
}
How to solve this.
Answers Appreciated.