Are Interfaces supported in (Microsoft) unmanaged C++?

Hi:

In the C#/.Net Managed Interfaces are supported.

Are interfaces supported in unmanaged C++?
I know I can create an abstract class with virtual function pointers which simulate an interface definition.
But, does the concept of a C# style interface exist?


Thanks,
JohnB
LVL 1
jxbmaSoftware ConsultantAsked:
Who is Participating?
 
Carl TawnSystems and Integration DeveloperCommented:
No, C++ doesn't have an actual Interface type.

If you think about it, C++ supports multiple inheritance so has no need for a specific interface type.
0
 
jxbmaSoftware ConsultantAuthor Commented:
Cool beans.
That's what I thought.
0
 
phoffricCommented:
One of my C++ projects required interfaces. This was implemented using abstract classes with only pure virtual functions and no implementations and no data members; and also used virtual destructors.
0
 
jxbmaSoftware ConsultantAuthor Commented:
phoffric::>> How did you wrap/expose the classes in that project to be consumed by a C# (managed) client?

Thanks,
JB
0
 
phoffricCommented:
>> How did you wrap/expose the classes in that project to be consumed by a C#
This question was not in the OP. My project didn't use C# so this was a non-issue.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.