Trwsdf, вот вы и продемонстрировали свои "знания" языка,
который так не любите:
http://ideone.com/9d2Ti2 (режим C++11):
C++ |
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
| struct mother
{
virtual void func1() {}
};
struct father
{
virtual void func2() {}
};
struct child : mother, father
{
};
int main()
{
father * p = new child();
delete p;
return 0;
} |
|
Вот цитата из стандарта. Читайте, просвящайтесь:
C++03, Unary Expressions, Delete
In the first alternative (delete object), if the static type of the
operand is different from its dynamic type, the static type shall be a base
class of the operand’s dynamic type and the static type shall have a
virtual destructor or the behavior is undefined.

Сообщение от
Trwsdf
В принципе, вещь доводящая до слез неграмотных программистов С++, вроде вас и "экспертов" сего форума
Поставил "-".
"За постоянные выпады в адрес форумчан".