Connecting Tech Pros Worldwide Forums | Help | Site Map

Why can't I initialize my static member data in my constructor's init

Newbie
 
Join Date: Jun 2007
Posts: 13
#1: Jun 22 '07
can anybody tell me in detail.



dumparun's Avatar
Newbie
 
Join Date: Feb 2007
Posts: 26
#2: Jun 22 '07

re: Why can't I initialize my static member data in my constructor's init


Quote:

Originally Posted by mahendra23

can anybody tell me in detail.

static member data has a global scope and will reside through out the entire life of the program.
There is only one copy and will be initialized only once.
A constructor is called everytime the class is instantiated, and the reason !!!!!
Reply