https://support.microsoft.com/ko-kr/kb/125749/ko
샘플 코드
/* Compile options needed: none
*/
class A;
void fcn( A* );
class A
{
public:
virtual void f() = 0;
A() { fcn( this ); }
};
class B : A
{
void f() { }
};
void fcn( A* p )
{
p->f();
}
// The declaration below invokes class B's constructor, which
// first calls class A's constructor, which calls fcn. Then
// fcn calls A::f, which is a pure virtual function, and
// this causes the run-time error. B has not been constructed
// at this point, so the B::f cannot be called. You would not
// want it to be called because it could depend on something
// in B that has not been initialized yet.
B b;
void main()
{
}
'디버깅' 카테고리의 다른 글
crash dump (0) | 2016.08.21 |
---|---|
sxstrace, dependencywalker 사용법 (0) | 2016.07.14 |
error c2011 'sockaddr' 'struct' type redefinition (2) | 2015.07.18 |
[linux] gdb virtual memory exhausted : cannot allocate memory (0) | 2015.05.30 |
[Win/C++] error LNK2019: unresolved external symbol (0) | 2015.05.19 |