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 pointer -to-members in C++? Give their syntax?
What are punctuators in c++?
What is scope operator in c++?
What is an inline function in c++?
What is the use of data hiding?
What is an overflow error?
Why do we use setw in c++?
Which is the best c++ software?
What are the various situations where a copy constructor is invoked?
What is the type of 'this' pointer?
What is virtual function? Explain with an example
What is stream and its types in c++?
What is an inclusion guard?
What are the differences between the function prototype and the function defi-nition?
What c++ is used for?