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
Do you know about C++ 11 standard?
How the keyword struct is different from the keyword class in c++?
What is decltype c++?
Which bit wise operator is suitable for checking whether a particular bit is on or off?
What is an iterator?
What are manipulators used for?
What is the word you will use when defining a function in base class to allow this function to be a polimorphic function?
When can I use a forward declaration?
What is an incomplete type in c++?
Specify different types of decision control statements?
What is this weird colon-member (" : ") syntax in the constructor?
Why do we need runtime polymorphism in c++?
What is an orthogonal base class in c++?
What is virtual destructor? What is its use?
Why would you use pointers in c++?