patelpradeep's Avatar, Join Date: Oct 2009
Newbie Member
hi,

I have a doubt here regarding const data members. I guess the static const data members can be initialized inside a class only if they are integral or enumeration type.

Please correct me if i am wrong.
Mridula's Avatar, Join Date: Mar 2008
Pro contributor
Hi patelpradeep,

Nothing like that. We can initilize all data types of "static const". Thats why as you can see, purposefully I have taken the example of "double" data type in the article.
All the programs what has been put in the article are compiled successully and result also given for the same.

thanks
mridula.
shabbir's Avatar, Join Date: Jul 2004
Go4Expert Founder
Nomination Closed and Voting started for Article of the month - Sep 2009. You can vote for this Article
djbrown's Avatar, Join Date: Oct 2009
Go4Expert Member
nice thread!
Mridula's Avatar, Join Date: Mar 2008
Pro contributor
thanks djbrown.
peterdrew's Avatar, Join Date: Jul 2010
Newbie Member
Oh, thanks, the write is useful,....