derived-class
C#: How to use a derived class's const variable in base's constructor
Thanks in advance, My situation is that I have an abstract class called Vehicle that holds: private List<Tire> m_Tires;[详细]
2023-01-29 21:41 分类:问答Call derived class method from base class reference
class Material { public: void foo() { cout << \"Class Material\"; } }; class Unusual_Material : public Material[详细]
2023-01-26 03:27 分类:问答how to automate template typename specification with CLASSNAME<typename>(argument);
I\'m creating a stat editor for some objects within a game world. Rather than have multiple edit menus for each object type, I just have one menu, and pass in a list/vector of stat-edit-objects which[详细]
2023-01-21 01:26 分类:问答cannot access protected variable in derived class c++
I have a Binary Search Tree as a derived class from a Binary Tree,right now I am trying to access the root for my recursive functions (which is in the base class). But for some reason I keep getting t[详细]
2023-01-20 17:15 分类:问答How to call child object's overloading function in polymorphism?
Consider the following simple polymorphism ... class Parent { public: someFunc() { /* implementation A */ };[详细]
2023-01-19 18:06 分类:问答C++ fill array with objects derived from array type
In C++ I have an array of pointers to Player objects and want to fill it with Fickle objects where Fickle is a class that is derived from Player. This is because I want a general Player array that I c[详细]
2023-01-18 16:03 分类:问答Typical problem on Inheritance [duplicate]
This question already has answers here: Closed 12 years ago. Possible Duplicate: Why is this not allowed in C++?[详细]
2023-01-15 05:23 分类:问答Using declaration (Derived class)
struct B1{ int d; void fb(){}; }; struct B2 : B1{ using B1::d; using B1::fb; int d;// why this gives error? void fb(){}// and this does not?[详细]
2023-01-12 11:48 分类:问答c++ handling derived class that's self referencing
So suppose I have a tree class like this in c++ class Node{ void addChild(Node*); /*obvious stuff*/ protected:[详细]
2023-01-11 20:04 分类:问答Accessing derived class from base class object issue
I have a kind of weird situation ... I have a User Control in WPF witch in turn has some other User Controls attached to it, then I have a huge C# code file with a big algorithm which needs access to[详细]
2023-01-10 11:31 分类:问答