Where is the error?
```
class B
{
public:
B(int i): x(i) {}
// . . .
private:
int x;
};
class D : public B
{
public:
D() { /* . . . */ }
private:
// . . .
};
int main()
{
D y;
return 0;
}
```
There is no default base class constructor for the compiler to call at the definition of the derived class destructor. One compiler is a bit more generic. It complains that there is no “appropriate” constructor to call at this point.
You might also like to view...
Select the form control below that would be most appropriate to accept free-form comments about your website.
a. select list b. text box c. scrolling text box d. None of the above
What is the purpose of a project in a C++ development environment?
What will be an ideal response?
The strategy of denying the “no-preemption” condition could lead to ________.
a) indefinite postponement b) loss of work c) poor resource utilization d) both a and b
For each data task specification, the Create Outlook Task option can be used to place a new task in the user's Outlook Tasks folder
Indicate whether the statement is true or false