A
Atharvan!!!
first of all accept my apologies for bad english.
(I am not a native english speaker)
I am a 1st year B.Sc CS student.
What I understood is follows
1) A const data member must be initialized at the time of declaration.
2) Datamembers of a class cannot be initialized in the class
declaration itself.
(ie., we need either the help of constructer or use a
memberfunction.)
Am I correct?
Then my doubt is that, how can we declare a const data member in a
class.
(suerly we cannot it initialize it that time.It is against the 1st
statement
if we can initialize it there it is against the 2nd statement.)
Please help me.
Arun
[
Atharvan!!!
{333}
<a href:"http://chintaadaara.blogspot.com">Chintaadaara</a>
]
(I am not a native english speaker)
I am a 1st year B.Sc CS student.
What I understood is follows
1) A const data member must be initialized at the time of declaration.
2) Datamembers of a class cannot be initialized in the class
declaration itself.
(ie., we need either the help of constructer or use a
memberfunction.)
Am I correct?
Then my doubt is that, how can we declare a const data member in a
class.
(suerly we cannot it initialize it that time.It is against the 1st
statement
if we can initialize it there it is against the 2nd statement.)
Please help me.
Arun
[
Atharvan!!!
{333}
<a href:"http://chintaadaara.blogspot.com">Chintaadaara</a>
]