Armenian Knowledge Base  

Go Back   Armenian Knowledge Base > Technical sections > Languages, Compilers, Interpreters
Register

Reply
 
LinkBack Thread Tools
Old 05.03.2002, 16:29   #1
Младенец
 
Join Date: 11 2001
Location: Armenia
Posts: 11
Downloads: 0
Uploads: 0
Reputation: 0 | 0
Exclamation Virtual inheritance ??

Bring an example when virtual inheritance increases size of the derived class and non-virtual inheritance of the same classes is decrease.
Reply With Quote
Old 05.03.2002, 17:08   #2
The Reloaded
 
Aram Hambardzumyan's Avatar
 
Join Date: 01 2002
Location: behind the flesh and gelatinе of soft dull eyes
Posts: 3,387
Downloads: 4
Uploads: 0
Reputation: 146 | 4
Post

<blockquote><font size="1" face="MS Sans Serif, Verdana, Helvetica, sans-serif">quote:</font><hr>Originally posted by Taurus:
Bring an example when virtual inheritance increases size of the derived class and non-virtual inheritance of the same classes is decrease.<hr></blockquote>

ну что за маразм!.. зачем все это тут? сдавайте свои экзамены сами! а пример - вот он:

class B
{
char c;
};

class V1: virtual B
{};

class V2: virtual B
{};

class V12: V1, V2
{};
Reply With Quote
Old 06.03.2002, 11:55   #3
the mochinger
 
Hans Andersen's Avatar
 
Join Date: 02 2002
Location: Paranoid Android, @10:50
Age: 38
Posts: 1,894
Downloads: 2
Uploads: 0
Reputation: 204 | 4
Post

Suro,
class B{};
class Smaller: public B{};
class Larger: virtual public B{};

Bajz standardov guarantee chka, vor Larger-i sizen aveli mez a qan Smaller-iny.
Sur, ete standardin hamapatasxanox orinak beres, kzarmanam <img src="smooch-1.gif" border="0">

Aram,
inch problem ka vor? Karzum em vor ajs forumi npatakneriz mekn el ajn e, vor c++-i mardik(vo!) shpven mimjanz het. Ete hetaqrqir xndir unenas C++ iz, mez hachujqov kporzei luzel.

All,
lav xndirner post areq. hetaqrqir jamanz e eli <img src="smooch-1.gif" border="0">
__________________
The flower that blooms in adversity is the most rare and beautiful of all.
Reply With Quote
Old 06.03.2002, 14:34   #4
Академик
 
greka's Avatar
 
Join Date: 09 2001
Location: inside myself
Posts: 5,369
Downloads: 0
Uploads: 0
Reputation: 18 | 5
Lightbulb


2 Aram Hambardzumyan:


Firstly, your response does not relate to the question of Taurus - you may take a closer look at the question;

Secondly, interesting propositions just increases your own skills in that area.

And in the third place - please no "slogans" here.

kind regards.
Reply With Quote
Sponsored Links
Reply

Thread Tools


На правах рекламы:
реклама

All times are GMT. The time now is 13:17.


Powered by vBulletin® Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.