473,654 Members | 3,062 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1428
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
4328
by: Graham Banks | last post by:
Does using multiple inheritance introduce any more performance overhead than single inheritance?
22
23347
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 examples?
5
2119
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 disagreement about whether is essential in C++". Are there any disadvantages of using multiple inheritence?
47
4005
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 support multiple inheritance. In C++ for instance I noticed that the compiler flags an error if you use the "ref" keyword on a class with multiple base classes. This supports the above quote. However, under the "CodeClass2.Bases" property (part...
0
8290
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8815
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
7306
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6161
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5622
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4149
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2714
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1916
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1593
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.