Click here to Skip to main content
15,892,005 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Enumerate or list all files on computer Pin
Richard MacCutchan18-Apr-12 5:17
mveRichard MacCutchan18-Apr-12 5:17 
AnswerRe: Enumerate or list all files on computer Pin
smags1318-Apr-12 8:38
smags1318-Apr-12 8:38 
AnswerRe: Enumerate or list all files on computer Pin
JohnCz24-Apr-12 2:04
JohnCz24-Apr-12 2:04 
Questionhow to move dialog in activex control? Pin
mir546517-Apr-12 23:10
mir546517-Apr-12 23:10 
QuestionRe: how to move dialog in activex control? Pin
David Crow18-Apr-12 2:07
David Crow18-Apr-12 2:07 
QuestionReference to a variable that goes out of scope Pin
elelont217-Apr-12 11:26
elelont217-Apr-12 11:26 
AnswerRe: Reference to a variable that goes out of scope Pin
Aescleal17-Apr-12 13:10
Aescleal17-Apr-12 13:10 
AnswerRe: Reference to a variable that goes out of scope Pin
Erudite_Eric17-Apr-12 22:31
Erudite_Eric17-Apr-12 22:31 
It depends on stack usage.

If you return a local var thats now out of scope to a func that eats the stack it will get munged. If not, it is still there, but its is risky of course.

Actually we found a windows bug that did just this. It returned a local var. This was OK till we hooked the func, and thus increased its tack usage.

In your case i is out of scope at code level, but is still on the stack since you havent returned from your func yet (your code is actually compiled with i on the stack just after pi).

--edit--

I see no one has responded. I guess an understanding of assembler (ie, the way code actually compiles) is totally foreign territory to todays 3G coders.
==============================

Nothing to say.


modified 19-Apr-12 2:43am.

GeneralRe: Reference to a variable that goes out of scope Pin
Stefan_Lang20-Apr-12 4:10
Stefan_Lang20-Apr-12 4:10 
GeneralRe: Reference to a variable that goes out of scope Pin
Erudite_Eric20-Apr-12 22:04
Erudite_Eric20-Apr-12 22:04 
Question[solved ]: 'MAKEINTRESOURCE' - Not Working Properly Pin
AmbiguousName17-Apr-12 0:31
AmbiguousName17-Apr-12 0:31 
QuestionRe: 'MAKEINTRESOURCE' - Not Working Properly Pin
David Crow17-Apr-12 3:10
David Crow17-Apr-12 3:10 
AnswerRe: 'MAKEINTRESOURCE' - Not Working Properly Pin
AmbiguousName17-Apr-12 5:31
AmbiguousName17-Apr-12 5:31 
AnswerRe: 'MAKEINTRESOURCE' - Not Working Properly Pin
Richard MacCutchan17-Apr-12 4:49
mveRichard MacCutchan17-Apr-12 4:49 
AnswerRe: 'MAKEINTRESOURCE' - Not Working Properly Pin
AmbiguousName17-Apr-12 5:31
AmbiguousName17-Apr-12 5:31 
GeneralRe: 'MAKEINTRESOURCE' - Not Working Properly Pin
David Crow17-Apr-12 5:37
David Crow17-Apr-12 5:37 
GeneralRe: 'MAKEINTRESOURCE' - Not Working Properly Pin
AmbiguousName17-Apr-12 5:51
AmbiguousName17-Apr-12 5:51 
GeneralRe: 'MAKEINTRESOURCE' - Not Working Properly Pin
David Crow17-Apr-12 6:01
David Crow17-Apr-12 6:01 
GeneralRe: 'MAKEINTRESOURCE' - Not Working Properly Pin
AmbiguousName17-Apr-12 6:07
AmbiguousName17-Apr-12 6:07 
QuestionRe: 'MAKEINTRESOURCE' - Not Working Properly Pin
David Crow17-Apr-12 6:39
David Crow17-Apr-12 6:39 
AnswerRe: 'MAKEINTRESOURCE' - Not Working Properly [modified] Pin
AmbiguousName17-Apr-12 6:57
AmbiguousName17-Apr-12 6:57 
GeneralRe: 'MAKEINTRESOURCE' - Not Working Properly [modified] Pin
David Crow18-Apr-12 5:08
David Crow18-Apr-12 5:08 
GeneralRe: 'MAKEINTRESOURCE' - Not Working Properly Pin
Richard MacCutchan17-Apr-12 7:08
mveRichard MacCutchan17-Apr-12 7:08 
Question[SOLVED] Accelerator key issue Pin
David Crow16-Apr-12 6:13
David Crow16-Apr-12 6:13 
AnswerRe: Accelerator key issue Pin
jkirkerx17-Apr-12 6:50
professionaljkirkerx17-Apr-12 6:50 

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.