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 / santosh patil

class members can be initialized directly like
class x{const int i=10;}
but its structures members tat cant be initialized lik above

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is meaning of in c++?

1211


What gives the current position of the put pointer?

996


Why is null pointer used?

1169


Which recursive sorting technique always makes recursive calls to sort subarrays that are about half size of the original array?

997


I was a c++ code and was asked to find out the bug in that. The bug was that he declared an object locally in a function and tried to return the pointer to that object. Since the object is local to the function, it no more exists after returning from the function. The pointer, therefore, is invalid outside.

1130


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

2375


Is std :: string immutable?

1033


Can I have a reference as a data member of a class? If yes, then how do I initialise it?

1221


How new/delete differs from malloc()/free?

1140


What does new in c++ do?

1018


Write about the access privileges in c++ and also mention about its default access level?

1055


Write a program to find the Factorial of a number

1058


How would you use the functions sin(), pow(), sqrt()?

1178


What is the history of c++?

1071


What do you mean by const correctness?

1084