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
Explain what happens when a pointer is deleted twice?
What is difference between n and endl in c++?
Explain deep copy and a shallow copy?
Which is best c++ or java?
What is prototype for that c string function?
How to allocate memory dynamically for a reference?
What programming language should I learn first?
How to declare a pointer to an array of integers?
What is the use of 'this' pointer?
What is the difference between *p++ and (*p)++ ?
What is the best book for c++ beginners?
What problems might the following macro bring to the application?
Why isn't sizeof for a struct equal to the sum of sizeof of each member?
what is VOID?
What is name hiding in c++?