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...

How do you initialize a class member,
class x {
const int i;
};

Answer Posted / harminder

It can be done in the intialization list of the constructor

x():i=10
{
}

Is This Answer Correct ?    3 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do you define/declare constants in c++?

1054


What do you understand by a pure virtual member function?

1012


What are containers in c++?

995


Comment on c++ standard exceptions?

1076


Write a program which employs Recursion

1243


What is meaning of in c++?

1219


Will a C compiler always compile C++ code a) Yes b) No c) Only optimized compilers

1055


Tell me can a pure virtual function have an implementation?

1034


Is string an object in c++?

1156


What is abstract keyword in c++?

1074


What is the best c c++ compiler for windows?

1066


How do you decide which integer type to use?

1012


Is map ordered c++?

1100


Is there a c++ certification?

1063


Which is best c++ or java?

1090