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


Please Help Members By Posting Answers For Below Questions

Which is the best c++ software?

624


What is bubble sort c++?

585


Why do we use pointers in c++?

604


What is the difference between a baller and a reference in C++?

586


What is an arraylist c++?

698






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.

3419


What is the basic of c++?

623


Should the this pointer can be used in the constructor?

564


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.

2007


Can malloc be used in c++?

582


How many ways can a variable be initialized into in C++?

609


What is class and structure in c++?

567


How can an improvement in the quality of software be done by try/catch/throw?

598


What are the important differences between c++ and java?

619


daily Routine of father

926