AKB Forums

Go Back   AKB Forums > Technical sections > Languages, Compilers and Interpreters
Home Register Blogs FAQ Members List Calendar Downloads Arcade Mark Forums Read

Languages, Compilers and Interpreters C,C++,C#,.NET,Java,PHP,Perl,SQL and more

Troubles when posting message? Click here! :: Проблемы с отправлением сообщения? Нажмите сюда!

Reply
 
LinkBack Thread Tools Display Modes
Old Mar 5, 2002, 15:29   #1
Младенец
 
Join Date: Nov 2001
Location: Armenia
Posts: 11
Rep Power: 0
Reputation: 10
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.
Taurus is offline   Reply With Quote Quote selected
Old Mar 5, 2002, 16:08   #2
The Reloaded
 
Aram Hambardzumyan's Avatar
 
Join Date: Jan 2002
Location: behind the flesh and gelatinе of soft dull eyes
Posts: 3,178
Rep Power: 7
Reputation: 45
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
{};
Aram Hambardzumyan is offline   Reply With Quote Quote selected
Old Mar 6, 2002, 10:55   #3
the mochinger
 
Hans Andersen's Avatar
 
Join Date: Feb 2002
Location: Paranoid Android, @10:50
Posts: 1,771
Rep Power: 7
Reputation: 102
Send a message via ICQ to Hans Andersen Send a message via MSN to Hans Andersen Send a message via Yahoo to Hans Andersen
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.
Hans Andersen is offline   Reply With Quote Quote selected
Old Mar 6, 2002, 13:34   #4
Administrator
 
greka's Avatar
 
Join Date: Sep 2001
Location: @work
Posts: 5,347
Rep Power: 10
Reputation: 23
Send a message via ICQ to greka
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.
__________________
И повешенные могут качаться в неположенную сторону. /С.Е.Лец/
greka is offline   Reply With Quote Quote selected
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 18:10.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
This board was founded on September 29, 2001
Powered by Viper Internet

Affordable Web Hosting | ParevNet

Buy text link