python (12.9k questions)
javascript (9.2k questions)
reactjs (4.7k questions)
java (4.2k questions)
java (4.2k questions)
c# (3.5k questions)
c# (3.5k questions)
html (3.3k questions)
Why in order to use default constructor in Derived Class, we need a default constructor in the Base Class
As you have seen in the title i need to find the error in the code bellow,
Here is what i know:
I know that in order to use default constructor in B, we need a default constructor in A
What i don't ...
louis clement
Votes: 0
Answers: 2
What's the point of a default constructor in OOP?
I'm relatively new/inexperienced when it comes to computer science. I was wondering what the point of having a default constructor is when you can just declare any fields you want in your class and in...
Allen
Votes: 0
Answers: 3
Why can I have a parameterless constructor and a constructor with only default parameters
Background
I'm working with unity which seems to be serialising classes using some parameterless constructors it creates.
The following code did not properly initialise values:
public WarmthProvider(f...

Jay
Votes: 0
Answers: 0
How to initialize a template object inside a class C++?
I want to create a template Node class like this
template <class T>
class Node {
public:
Node() {
val = T;
// Does not work: new T, NULL, 0, ""
}
// ...
pri...
Lemaul
Votes: 0
Answers: 1