在我运行它的调试模式(Visual Studio 2013)中的C ++ Win32控制台应用程序中,控制台窗口出现但它只是在开始时挂起而没有达到任何断点。
int _tmain(int argc, _TCHAR* argv[])
{
int y = 0;
B::CTest *c = new B::CTest();
//int t = c->CTest::test(10);
//std::cout << t;
return 0;
}
当我注释掉这行
时B::CTest *c = new B::CTest();
它起作用并且在开始时击中第一个断点。 任何想法为什么会这样?
编辑:构造函数定义
CPP
B::CTest::CTest()
{
//return;
}
HEADER
namespace B{
#define TEST
class TEST CTest{
public:
CTest(void);
int test(int i);
};
}