Click here to Skip to main content
16,017,297 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionWhy this is not failing in VC6 Pin
NiceNaidu30-May-06 23:29
NiceNaidu30-May-06 23:29 
AnswerRe: Why this is not failing in VC6 Pin
toxcct30-May-06 23:36
toxcct30-May-06 23:36 
GeneralRe: Why this is not failing in VC6 Pin
NiceNaidu30-May-06 23:48
NiceNaidu30-May-06 23:48 
AnswerRe: Why this is not failing in VC6 Pin
Sameer_Thakur30-May-06 23:43
Sameer_Thakur30-May-06 23:43 
GeneralRe: Why this is not failing in VC6 Pin
toxcct30-May-06 23:49
toxcct30-May-06 23:49 
GeneralRe: Why this is not failing in VC6 Pin
Sameer_Thakur30-May-06 23:58
Sameer_Thakur30-May-06 23:58 
GeneralRe: Why this is not failing in VC6 Pin
toxcct31-May-06 0:02
toxcct31-May-06 0:02 
GeneralRe: Why this is not failing in VC6 Pin
Sameer_Thakur31-May-06 0:08
Sameer_Thakur31-May-06 0:08 
Thats what I am trying to say.
Contents of pointer are the memory location.
Contents of variable are the actual value.


nNumber is global which means it can be access only within its scope.
Once you come out of that function, scope of that variable ends which means you cannot access it or it is undeclared.

But the value stored at that memory location remains untill it has been over written.
In other words 'Memory is taken away from the variable but the momory contents are unchanged'. And as you are having a pointer to point at that mmory location, you can always get the content at that location.

Rakesh
GeneralRe: Why this is not failing in VC6 Pin
toxcct31-May-06 0:10
toxcct31-May-06 0:10 
GeneralRe: Why this is not failing in VC6 Pin
Sameer_Thakur31-May-06 0:14
Sameer_Thakur31-May-06 0:14 
GeneralRe: Why this is not failing in VC6 Pin
Blake Miller31-May-06 6:10
Blake Miller31-May-06 6:10 
GeneralRe: Why this is not failing in VC6 Pin
NiceNaidu30-May-06 23:58
NiceNaidu30-May-06 23:58 
GeneralRe: Why this is not failing in VC6 Pin
Sameer_Thakur31-May-06 0:29
Sameer_Thakur31-May-06 0:29 
GeneralRe: Why this is not failing in VC6 Pin
NiceNaidu30-May-06 23:55
NiceNaidu30-May-06 23:55 
GeneralRe: Why this is not failing in VC6 Pin
Sameer_Thakur31-May-06 0:04
Sameer_Thakur31-May-06 0:04 
GeneralRe: Why this is not failing in VC6 Pin
BadKarma31-May-06 0:05
BadKarma31-May-06 0:05 
AnswerRe: Why this is not failing in VC6 Pin
Sarath C30-May-06 23:57
Sarath C30-May-06 23:57 
GeneralRe: Why this is not failing in VC6 Pin
NiceNaidu31-May-06 0:01
NiceNaidu31-May-06 0:01 
AnswerRe: Why this is not failing in VC6 Pin
Sarath C31-May-06 0:02
Sarath C31-May-06 0:02 
AnswerRe: Why this is not failing in VC6 Pin
Michael Dunn31-May-06 2:06
sitebuilderMichael Dunn31-May-06 2:06 
QuestionWhy "new" operator is "thread_safe" ? Pin
Ajax9530-May-06 23:17
Ajax9530-May-06 23:17 
AnswerRe: Why "new" operator is "thread_safe" ? Pin
BadKarma30-May-06 23:40
BadKarma30-May-06 23:40 
AnswerRe: Why "new" operator is "thread_safe" ? Pin
Nemanja Trifunovic31-May-06 1:28
Nemanja Trifunovic31-May-06 1:28 
QuestionC++ and ADO problem Pin
antonaras30-May-06 22:58
antonaras30-May-06 22:58 
AnswerRe: C++ and ADO problem Pin
NiceNaidu30-May-06 23:05
NiceNaidu30-May-06 23:05 

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.