473,406 Members | 2,867 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,406 software developers and data experts.

VS2005 and multiple inheritence

I heard that managed C++ in VS 2005 supports multiple inheritence. Is this
true?

Bob Rundle

Nov 17 '05 #1
5 1409
Bob Rundle wrote:
I heard that managed C++ in VS 2005 supports multiple inheritence.
Is this true?


All versions of VC++ since 1.0 support multiple inheritance - it's a
standard C++ feature.

That said, no version of VC++ supports multiple inheritance of managed
(.NET) classes, since this isn't supported by the CLR (although some .NET
languages, such as Eiffel, have managed to fake it).

-cd
Nov 17 '05 #2
> That said, no version of VC++ supports multiple inheritance of managed
(.NET) classes, since this isn't supported by the CLR
We can have multiple inheritance with the help of interfaces though.
Think of interfaces as classes which in which you can only have declrations
of the functions and "no" implementations. All functions in the class are
thus abstract and you must override them.

Thanks.
Kapil

"Carl Daniel [VC++ MVP]" wrote:
Bob Rundle wrote:
I heard that managed C++ in VS 2005 supports multiple inheritence.
Is this true?


All versions of VC++ since 1.0 support multiple inheritance - it's a
standard C++ feature.

That said, no version of VC++ supports multiple inheritance of managed
(.NET) classes, since this isn't supported by the CLR (although some .NET
languages, such as Eiffel, have managed to fake it).

-cd

Nov 17 '05 #3
kkhosla wrote:
That said, no version of VC++ supports multiple inheritance of
managed (.NET) classes, since this isn't supported by the CLR


We can have multiple inheritance with the help of interfaces though.
Think of interfaces as classes which in which you can only have
declrations of the functions and "no" implementations. All functions
in the class are thus abstract and you must override them.


It's not the same thing, but yes - you can have multiple interface
inheritance. You can't have multiple implementation inheritance in .NET,
although that's been a standard C++ feature for 10+ years.

-cd
Nov 17 '05 #4
> It's not the same thing, but yes - you can have multiple interface
inheritance. You can't have multiple implementation inheritance in .NET,
although that's been a standard C++ feature for 10+ years.

-cd


Does that mean we can expect ATL-style template code for .NET?

Adelle.
Nov 17 '05 #5
Adelle Hartley wrote:
It's not the same thing, but yes - you can have multiple interface
inheritance. You can't have multiple implementation inheritance in
.NET, although that's been a standard C++ feature for 10+ years.

-cd


Does that mean we can expect ATL-style template code for .NET?


I suppose that depends on what you mean by "ATL-style". VC++ 2005 supports
both C++ templates and CLR generics, and they can be intermixed in
interesting ways.

Better than ATL-style template code, that means that we can expect STL-style
template code for .NET, and the ability to use STL containers and algorithms
with managed types. For me, that alone is enough to immediately switch all
my new .NET development from C# to C++ once VC 2005 ships.

-cd
Nov 17 '05 #6

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

Similar topics

2
by: Graham Banks | last post by:
Does using multiple inheritance introduce any more performance overhead than single inheritance?
22
by: Matthew Louden | last post by:
I want to know why C# doesnt support multiple inheritance? But why we can inherit multiple interfaces instead? I know this is the rule, but I dont understand why. Can anyone give me some concrete...
5
by: Neelesh Bodas | last post by:
This might be slightly off-topic. Many books on C++ consider multiple inheritence as an "advanced" concept. Bruce Eckel says in TICPP, volume 2 that "there was (and still is) a lot of...
47
by: Larry Smith | last post by:
I just read a blurb in MSDN under the C++ "ref" keyword which states that: "Under the CLR object model, only public single inheritance is supported". Does this mean that no .NET class can ever...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
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.