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 / alphare
a, d, e
| Is This Answer Correct ? | 2 Yes | 1 No |
Post New Answer View All Answers
Explain the benefits of proper inheritance.
What is the fastest c++ compiler?
Explain the concept of friend function in c++?
Can a function take variable length arguments, if yes, how?
What is c++ best used for?
What are virtual constructors/destructors?
Is nan a c++?
What are inline functions? What is the syntax for defining an inline function?
Explain the isa and hasa class relationships. How would you implement each?
When should you use global variables?
What are the uses of typedef in a program?
Why use of template is better than a base class?
Write a C++ Program to check whether a number is prime number or not?
Will rust take over c++?
What is a singleton class c++?