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 u initialize the constant variables

Answer Posted / keshav.gadde

class sam
{
const int x;
public:
sam(int i):x(i)
{
cout<<i<<endl;
}
};
int _tmain(int argc, _TCHAR* argv[])
{
sam s(10);
return 0;
}

Is This Answer Correct ?    4 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can enum be null?

1027


What is the highest level of cohesion?

1056


What is an advantage of polymorphism?

1097


Advantage and disadvantage of routing in telecom sector

1310


What is Difference Between Inheritance and creating object and getting data? means Class A extends B{ B.getMethod();} (OR) Class A{ b obj=new B(); obj.getMethod(); }

2617


how to get the oracle certification? send me the answer

2162


What is difference between polymorphism and inheritance?

1094


State what is encapsulation and friend function?

1273


What is the difference between inheritance and polymorphism?

1120


What is destructor give example?

1064


What is encapsulation in simple terms?

1044


Why is polymorphism used?

1050


What is the point of oop?

1192


What is oops?what is its use in software engineering?

1037


What is encapsulation in ict?

1065