VS2005 and multiple inheritence

  • Thread starter Thread starter Bob Rundle
  • Start date Start date
B

Bob Rundle

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

Bob Rundle
 
Bob said:
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
 
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
 
kkhosla said:
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
 
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.
 
Adelle said:
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
 
Back
Top