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
a
| Is This Answer Correct ? | 2 Yes | 4 No |
Post New Answer View All Answers
Describe new operator?
How the delete operator differs from the delete[]operator?
Carry out conversion of one object of user-defined type to another?
What are vectors used for in c++?
Keyword mean in declaration?
What is ofstream c++?
What are the advantages of inheritance in c++?
Differentiate between the message and method in c++?
Name the debugging methods that are used to solve problems?
What is class invariant in c++?
What is a container class? What are the types of container classes in c++?
What is the type of this pointer in c++?
When must you use a pointer rather than a reference?
Explain friend class?
Explain the difference between abstract class and interface in c++?