python (65.1k questions)
javascript (44.2k questions)
reactjs (22.7k questions)
java (20.8k questions)
c# (17.4k questions)
html (16.3k questions)
r (13.7k questions)
android (12.9k questions)
How to create an interface to allow for the construction of different nested derived classes in C++?
My goal is to construct a derived classes nested class from the interface. However the nested classes don't have the same constructors. The question is how can I make an interface to create two differ...
ryanmattscott
Votes: 0
Answers: 1
Issues with inheritance and polymorphism
I'm currently learning inheritance and polymorphism in C++, and am coming across this issue when trying to create a child of a parent class that inherits and defines a virtual function.
The goal is fo...
StrugglingCSStudent
Votes: 0
Answers: 0
Call virtual function on derived member variable
This little test program crashes and I'm interested why it does:
#include <iostream>
struct SomeClass {
SomeClass() {
}
virtual ~SomeClass() {
}
void test() {
...
Gustavo
Votes: 0
Answers: 1
Why the size of class showing 12 and 16 byte?
I have five classes here, class A B C I can explain the size of them.
class D I expect the result is 12 bytes, but the output is 16 bytes, I found the reason is that after adding the virtual function,...
ENTNEAZ
Votes: 0
Answers: 1