Click here to Skip to main content
15,914,070 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: color button Pin
Hamid_RT17-Apr-06 19:13
Hamid_RT17-Apr-06 19:13 
QuestionNot getting ON_NOTIFY Pin
Jim Jim16-Apr-06 23:46
Jim Jim16-Apr-06 23:46 
AnswerRe: Not getting ON_NOTIFY Pin
YaronNir17-Apr-06 0:59
YaronNir17-Apr-06 0:59 
GeneralRe: Not getting ON_NOTIFY Pin
Jim Jim17-Apr-06 1:42
Jim Jim17-Apr-06 1:42 
GeneralRe: Not getting ON_NOTIFY Pin
YaronNir17-Apr-06 2:06
YaronNir17-Apr-06 2:06 
GeneralRe: Not getting ON_NOTIFY Pin
Jim Jim17-Apr-06 5:55
Jim Jim17-Apr-06 5:55 
QuestionAccess Control variable values in one PropertyPage from another Property Page. Pin
kiran janaswamy16-Apr-06 23:29
kiran janaswamy16-Apr-06 23:29 
AnswerRe: Access Control variable values in one PropertyPage from another Property Page. Pin
Nishad S17-Apr-06 0:05
Nishad S17-Apr-06 0:05 
AnswerRe: Access Control variable values in one PropertyPage from another Property Page. Pin
David Crow17-Apr-06 3:36
David Crow17-Apr-06 3:36 
QuestionHow detect leak memory Pin
Le Thanh Cong16-Apr-06 23:03
Le Thanh Cong16-Apr-06 23:03 
AnswerRe: How detect leak memory Pin
sunit517-Apr-06 0:04
sunit517-Apr-06 0:04 
GeneralRe: How detect leak memory Pin
Le Thanh Cong17-Apr-06 21:19
Le Thanh Cong17-Apr-06 21:19 
AnswerRe: How detect leak memory Pin
YaronNir17-Apr-06 1:03
YaronNir17-Apr-06 1:03 
GeneralRe: How detect leak memory Pin
Le Thanh Cong17-Apr-06 21:18
Le Thanh Cong17-Apr-06 21:18 
AnswerRe: How detect leak memory Pin
Hamid_RT17-Apr-06 19:43
Hamid_RT17-Apr-06 19:43 
GeneralRe: How detect leak memory Pin
Le Thanh Cong17-Apr-06 21:12
Le Thanh Cong17-Apr-06 21:12 
Questionchange program icon in VS2005 Pin
big_denny_20016-Apr-06 23:02
big_denny_20016-Apr-06 23:02 
AnswerRe: change program icon in VS2005 Pin
YaronNir17-Apr-06 4:45
YaronNir17-Apr-06 4:45 
AnswerRe: change program icon in VS2005 Pin
Hamid_RT17-Apr-06 19:35
Hamid_RT17-Apr-06 19:35 
QuestionGlobal static variables Pin
vikramlinux16-Apr-06 22:46
vikramlinux16-Apr-06 22:46 
AnswerRe: Global static variables Pin
sunit516-Apr-06 23:02
sunit516-Apr-06 23:02 
GeneralRe: Global static variables Pin
vikramlinux16-Apr-06 23:13
vikramlinux16-Apr-06 23:13 
GeneralRe: Global static variables Pin
vikramlinux17-Apr-06 0:37
vikramlinux17-Apr-06 0:37 
GeneralRe: Global static variables Pin
vikramlinux17-Apr-06 0:38
vikramlinux17-Apr-06 0:38 
Hi Friends,
After some analysis I got following answers
1) When u compile your files(any type of project). each cpp/cxx/C file treated as separate translation unit
2) Object file will be created for each one of them

So for static variables

1) If the static variable in declared in some other cpp/cxx/c file, U can not access it ( using extern keyword) as it becomes as private for that file/translation unit.
2) If u declared global static variable in header file then each translation unit will get copy of it and also your final exe will contain mutiple instances of that global variable
for each file contents (means the functions/classes... inside file ).

Experts.. Please correct me if there is any incorrectness.

VikramS

-- modified at 6:40 Monday 17th April, 2006
QuestionTiming diagram Pin
RockyJames16-Apr-06 22:40
RockyJames16-Apr-06 22:40 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.