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
Can we overload operator in c++?
Is main a class in c++?
find the two largest values among the 6 numbers using control structures : do-while,for,if else,nestedif- else ,while. one or two of them.
What is the difference between passing by reference and passing a reference?
What is & in c++ function?
Can you pass an array to a function in c++?
Write an algorithm that determines whether or not an almost complete binary tree is a heap.
Declare a class vehicle and make it an abstract data type.
What is diamond problem in c++?
What is the first name of c++?
Does there exist any way to make the command line arguments available to other functions without passing them as arguments to the function?
What do you mean by global variables?
How can you quickly find the number of elements stored in a dynamic array?
What is a sequence in c++?
What is a .lib file in c++?