pure-virtual
Can a class still be pure abstract if it has a non-pure destructor?
I am working on an exercise which asks me to take a base class Rodent an开发者_开发知识库d make it a pure abstract class. My understanding of a pure abstract class is that it acts as an interface and[详细]
2023-04-08 03:36 分类:问答Abstract class with pure virtual method - why is it possible to do "Abstract * abs3;"?
Consider the following : class Abstract { public: virtual void f开发者_JAVA技巧unc() = 0; }; int main() {[详细]
2023-04-01 15:19 分类:问答Doesn't putting a "virtual destructor inside an interface" make it, by definition, not an interface anymore?
So here is the box I am in.I want to understand why it is important to have a \"virtual destructor inside your interface class\".You will see why that stuff is in quotes if you can hang to the end...I[详细]
2023-03-26 14:06 分类:问答Accessing functions of a class that implement an Interface that are not part of the Interface
I am writing an application in c++. I have an interface defined with various functions: class ITest { public:[详细]
2023-03-25 23:11 分类:问答C++ map.clear() pure virtual method runtime error
I believe the problem may stem 开发者_开发问答from using boost::shared_ptrs as key values. //header file:[详细]
2023-03-24 05:18 分类:问答When should a virtual method be pure?
I have found some code that I am working on, and wa开发者_Python百科s wondering what the best design implementation is.[详细]
2023-03-23 11:15 分类:问答Pure virtual functions and unused arguments in child functions in C++
I have the following: class Parent { public: virtual bool foo(vector<string> arg1, vector<string> arg2) = 0;[详细]
2023-03-21 05:40 分类:问答Change pure virtual to virtual and stay binary compatible
Can I change a pure-virtual function (in a base class) to become non-pure开发者_如何学C without running into any binary compatibility issues? (Linux, GCC 4.1)[详细]
2023-03-21 03:37 分类:问答pure virtual declarations in subclasses
i have a a couple c++ interfaces like this: struct IThese { virtual void doThesethings() = 0; } struct IThose : public IThese {[详细]
2023-03-20 00:09 分类:问答What does it mean to set the declaration of a function equal to 0? How can you assign an integer to a function?
I was browsing through the sources of a (prefer not to name) GUI Toolkit which wrapped up the Windows API when I found the following function 开发者_如何学运维definition in the window class:[详细]
2023-03-19 13:31 分类:问答