Biology, asked by nishadkrishna227, 9 months ago

How do we declare an interface' class?
हम इंटरफ़ेस क्लास' कैसे डिक्लेअर करते हैं?
Select one:
a. It is not possible to create interface class in C++
C++ में इंटरफ़ेस क्लास बनाना संभव नहीं है
b. By declaring the class as interface with the keyword interface
इंटरफेस' कीवर्ड के साथ क्लास को इंटरफेस के रूप में घोषित करके
c. By making all the methods abstract using the keyword abstract' in a class
एक क्लास में abstract कीवर्ड का उपयोग करते हए सभी मेथड्स को ऐब्सट्रैक्ट(abstract) बनाकर
d. By making all the methods pure virtual in a class
एक क्लास में सभी मेथडस को प्योर वर्चुअल बनाकर
RAPEntanautOITION​

Answers

Answered by gauravstudent2005
0

To expand on the answer by bradtgmurray, you may want to make one exception to the pure virtual method list of your interface by adding a virtual destructor. This allows you to pass pointer ownership to another party without exposing the concrete derived class. The destructor doesn't have to do anything, because the interface doesn't have any concrete members. It might seem contradictory to define a function as both virtual and inline, but trust me - it isn't.

I hope it will help you

Similar questions