Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

class Foo {
public:
Foo(int i) { }
};
class Bar : virtual Foo {
public:
Bar() { }
};

Bar b;

Referring to the above code, when the object 'b' is defined,
a compiler error will occur. What action fixes the compiler
error?
a) Adding a virtual destructor to the class Bar
b) Adding a constructor to Bar which takes an int parameter
c) Adding "Foo()" to the Bar constructor
d) Adding a copy constructor to the class Foo
e) Adding "Foo(0)" to the Bar::Bar initializer list

Answer Posted / man

class Foo {
public:
Foo(int i) { }
};
class Bar : virtual Foo {
public:
Bar():Foo(0) { }
};

Ans e

Is This Answer Correct ?    7 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a syntax in c++?

1148


write a program that withdrawals,deposits,balance check,shows mini statement. (using functions,pointers and arrays)

2365


Perform addition, multiplication, subtraction of 2-D array using Operator Overloading.

3847


What are protected members in c++?

1122


What is a singleton class c++?

1013


What is a storage class used in c++?

1074


What is using namespace std in cpp?

1139


What programming language should I learn first?

1080


What are shallow and deep copies?

1105


Array base access faster or pointer base access is faster?

2288


How long will it take to learn programming?

1047


Is it possible to have a recursive inline function in c++?

1011


Explain the concept of memory leak?

1094


what Is DCS ? what i will get benefit when i did?

2349


What is #include math h in c++?

1066