![]() |
![]() | #16 |
The Reloaded Join Date: 01 2002 Location: behind the flesh and gelatinе of soft dull eyes
Posts: 3,387
Downloads: 4 Uploads: 0
Reputation: 146 | 4 | ![]()
итак, пример: Code: struct B1 { virtual ~B1() { } int i; }; struct B2 { virtual ~B2() { } char* ss; }; struct D: B2, B1 {}; int main() { D* d = new D; d->ss = new char[3]; B1* b1 = (B1*)(void*)d; b1->i = 0; cout << d->ss; return 0; } |
![]() |
![]() | #17 | |
Младенец Join Date: 01 2002 Location: Nor Hajen
Posts: 12
Downloads: 0 Uploads: 0
Reputation: 0 | 0 | ![]() Quote:
![]() Qo kodi grarman &isht exanakn e Code: struct B1 { virtual ~B1(){} }; struct B2 { virtual ~B2(){} }; struct D: B2, B1 { virtual ~D(){} }; int main() { B1* b1 = new D; delete b1; B2* b2 = new D; delete b2; return 0; } [email protected] chi karox imanal object-i irakan [email protected] operator delete()-i hamar. Miak lutsumn e virtual destructor0i [email protected] bazayin class-um. Have fun!! ![]()
__________________ Best of luck! | |
![]() |
![]() | #18 | |
The Reloaded Join Date: 01 2002 Location: behind the flesh and gelatinе of soft dull eyes
Posts: 3,387
Downloads: 4 Uploads: 0
Reputation: 146 | 4 | ![]() Quote:
![]() | |
![]() |
Sponsored Links |