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
How can we check whether the contents of two structure variables are same or not?
What do you mean by function and operator overloading in c++?
A company pays its salespeople on a commission basis. The salespeople receive $200 per week plus 9 percent of their gross sales for that week. For example, a saleperson who sells $5000 worth of merchandise in a week receives $200 plus 9 percent of $5000, or a total of $650. You have been supplied with a list of items sold by each salesperson. The values of these items are as follows: Item Value A 239.99 B 129.75 C 99.95 D 350.89 Write a program that inputs one salesperson's items sold in a week (how many of item A? of item B? etc.) and calculates and displays that salesperson's earnings for that week.
Is vector a class in c++?
Can we make copy constructor private in c++?
Is c++ built on c?
What is the difference between global variables and static varables?
What is the purpose of ios::basefield in the following statement?
Do class declarations end with a semicolon? Do class method definitions?
Which sort is best for the set: 1 2 3 5 4 a) Quick Sort b) Bubble Sort c) Merge Sort
Differentiate between declaration and definition.
Comment on c++ standard exceptions?
Which is not a valid keyword a) public b) protected c) guarded
Can I learn c++ in a week?
What is setf in c++?