Click here to Skip to main content
15,886,199 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionEthernet Permanent MAc Address Pin
PierMario31-May-06 0:02
PierMario31-May-06 0:02 
AnswerRe: Ethernet Permanent MAc Address Pin
Naveen31-May-06 1:24
Naveen31-May-06 1:24 
QuestionProjective transformation Algorithm required Pin
Arun Tayal30-May-06 23:57
Arun Tayal30-May-06 23:57 
QuestionWaitForDebugEvent Pin
HakunaMatada30-May-06 23:50
HakunaMatada30-May-06 23:50 
AnswerRe: WaitForDebugEvent Pin
Sarath C31-May-06 0:06
Sarath C31-May-06 0:06 
AnswerRe: WaitForDebugEvent Pin
Sarath C31-May-06 0:09
Sarath C31-May-06 0:09 
AnswerRe: WaitForDebugEvent Pin
NiceNaidu31-May-06 0:10
NiceNaidu31-May-06 0:10 
QuestionWhy this is not failing in VC6 Pin
NiceNaidu30-May-06 23:29
NiceNaidu30-May-06 23:29 
#include <stdio.h><br />
<br />
int *pPointer;<br />
<br />
void SomeFunction()<br />
{<br />
    int nNumber;<br />
    nNumber = 25;    <br />
<br />
    // make pPointer point to nNumber:<br />
    pPointer = &nNumber;<br />
}<br />
<br />
void main()<br />
{<br />
    SomeFunction(); // make pPointer point to something<br />
<br />
    // why does this fail?<br />
    printf("Value of *pPointer: %d\n", *pPointer);<br />
}


Hi friends,

the above code is working without any problems in VC6.

But it should fail at the line printf("Value of *pPointer: %d\n", *pPointer);

because pPointer is pointing to a local variable,which is already deleted.





Appu..
"If you judge people, you have no time to love them."
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 
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 

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.