Go4Expert

Go4Expert (http://www.go4expert.com/)
-   C++ (http://www.go4expert.com/articles/cpp-tutorials/)
-   -   All about const in C++ (http://www.go4expert.com/articles/const-cpp-t19261/)

patelpradeep 8Oct2009 17:20

Re: All about const in C++
 
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 9Oct2009 10:50

Re: All about const in C++
 
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 19Oct2009 21:36

Re: All about const in C++
 
Nomination Closed and Voting started for Article of the month - Sep 2009. You can vote for this Article

djbrown 22Oct2009 14:35

Re: All about const in C++
 
nice thread!

Mridula 23Oct2009 13:49

Re: All about const in C++
 
thanks djbrown.

peterdrew 5Aug2010 20:22

Re: All about const in C++
 
Oh, thanks, the write is useful,....


All times are GMT +5.5. The time now is 13:19.