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 / gayatri

using constructor we can initialize a class member in public
part of class.

class x
{
private: int i;

public: x()
{
i = 10;
}

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is c++ pass by reference or value?

1002


What is c++ similar to?

1132


Is nan a c++?

1090


What is the operator in c++?

1069


Search for: what is pair in c++?

1068


What is a container class?

1053


What is the use of 'this' pointer?

1202


What's the best free c++ profiler for windows?

1031


What is atoi?

922


Describe the process of creation and destruction of a derived class object?

1068


What is c++ try block?

991


What is a container class? What are the types of container classes in c++?

1149


Do you know what are pure virtual functions?

1102


What are manipulators in c++ with example?

1000


What is time h in c++?

1076