473,405 Members | 2,185 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Implementation of virtual inheritance by compilers

Dear Dudes,
I want to know how compiler implements virtual
inheritance using pointers? If possible give me example explaing how
compiler uses pointers in implementing virtual base classes?

Thanks,

Ciao,
Mano
Jul 19 '05 #1
6 2460
WW
manohar wrote:
Dear Dudes,
Dear Dude,
I want to know how compiler implements virtual
inheritance using pointers?
It might.
If possible give me example explaing how
compiler uses pointers in implementing virtual base classes?


Nope:
http://www.slack.net/~shiva/welcome.txt

comp.compilers

--
WW aka Attila
Jul 19 '05 #2
WW wrote:
If possible give me example explaing how
compiler uses pointers in implementing virtual base classes?


Nope:
http://www.slack.net/~shiva/welcome.txt


Also, see Stroustrup, 3ed, Section 2.2 (IIRC).

/david

--
Andre, a simple peasant, had only one thing on his mind as he crept
along the East wall: 'Andre, creep... Andre, creep... Andre, creep.'
-- unknown
Jul 19 '05 #3
WW
David Rubin wrote:
WW wrote:
If possible give me example explaing how
compiler uses pointers in implementing virtual base classes?


Nope:
http://www.slack.net/~shiva/welcome.txt


Also, see Stroustrup, 3ed, Section 2.2 (IIRC).


Programming Paradigms???

--
WW aka Attila
Jul 19 '05 #4
WW wrote:

David Rubin wrote:
WW wrote:
If possible give me example explaing how
compiler uses pointers in implementing virtual base classes?

Nope:
http://www.slack.net/~shiva/welcome.txt


Also, see Stroustrup, 3ed, Section 2.2 (IIRC).


Programming Paradigms???


I don't have it in front of me. There is a short section towards the
front which illustrates how virtual table pointers might be implemented.

/david

--
Andre, a simple peasant, had only one thing on his mind as he crept
along the East wall: 'Andre, creep... Andre, creep... Andre, creep.'
-- unknown
Jul 19 '05 #5
David Rubin wrote:
I don't have it in front of me. There is a short section towards the
front which illustrates how virtual table pointers might be implemented.


"The C++ Programming Language: Third Edition" by Bjarne Stroustrup,
Chapter 2 A Tour of C++, Section 5 Data Abstraction,
Subsection 5 Virtual Functions, pages 36-7.

Jul 19 '05 #6
WW
E. Robert Tisdale wrote:
David Rubin wrote:
I don't have it in front of me. There is a short section towards the
front which illustrates how virtual table pointers might be
implemented.


"The C++ Programming Language: Third Edition" by Bjarne Stroustrup,
Chapter 2 A Tour of C++, Section 5 Data Abstraction,
Subsection 5 Virtual Functions, pages 36-7.


Cool. Now all together: look at the original post and observe that the OP
asked about *virtual base classes* and *virtual inheritance*, not virtual
functions.

--
WW aka Attila
Jul 19 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Kapil Khosla | last post by:
Dear all, I am trying to underlying implementation of virtual functions in C++. The way I understand polymorphism is class Base { public: virtual int func(); };
19
by: qazmlp | last post by:
class base { // other members public: virtual ~base() { } virtual void virtualMethod1()=0 ; virtual void virtualMethod2()=0 ; virtual void virtualMethod3()=0 ;
4
by: JKop | last post by:
I'm starting to think that whenever you derive one class from another, that you should use virtual inheritance *all* the time, unless you have an explicit reason not to. I'm even thinking that...
3
by: Gianni Mariani | last post by:
In the code below, controller::controller() is never invoked, however, it appears there is no way to make a compile-time rule that this should not happen. The code below seems to make compilers...
8
by: Ioannis Vranos | last post by:
Why this does not compile: class Sealed { friend class Fred; Sealed() { } }; class Fred: virtual Sealed
7
by: tron.thomas | last post by:
Please consider the following code: class Abstract { public: virtual ~Abstract() {} virtual void Method() = 0; }; class Concrete : public virtual Abstract
3
by: Imre | last post by:
Hi! I've got some questions regarding heavy use of virtual inheritance. First, let's see a theoretical situation, where I might feel tempted to use a lot of virtual inheritance. Let's...
18
by: bsruth | last post by:
I tried for an hour to find some reference to concrete information on why this particular inheritance implementation is a bad idea, but couldn't. So I'm sorry if this has been answered before....
17
by: Galian | last post by:
Hi all. I have some questions about interface implementation, if anybody can help me, I will be very thank. So: If i have some interface IA: class IA { virtual void SomePureVirtFunc() = 0;...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.