class Foo {
const int x;
protected:
Foo(int f);
~Foo();
};
Foo f;
Referring to the sample code above, why will the class
declaration not compile?
a) The variable x is const.
b) The destructor is protected.
c) The destructor is not public.
d) The constructor is protected.
e) There is no default constructor.
Answer Posted / guest
There is no default Constructor
Is This Answer Correct ? | 11 Yes | 3 No |
Post New Answer View All Answers
What is #include ctype h in c++?
What are the two types of polymorphism?
Write a program to show polymorphism in C++?
What is the standard template library (stl)?
What is the use of register keyword with the variables?
What are the advantages of c++? Explain
Is java as fast as c++?
Is c++ a good first language to learn?
What is size_type?
What is meant by const_cast?
Differentiate between C and C++.
Explain how we implement exception handling in c++?
Why is c++ a mid-level programming language?
Out of fgets() and gets() which function is safe to use?
Can a class be static in c++?