Click here to Skip to main content
15,923,051 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Questionhow can i debug my dll in officexp Pin
ytfrdfiw15-Apr-07 21:31
ytfrdfiw15-Apr-07 21:31 
AnswerRe: how can i debug my dll in officexp Pin
Gospodin Baron15-Apr-07 22:13
Gospodin Baron15-Apr-07 22:13 
GeneralRe: how can i debug my dll in officexp Pin
ytfrdfiw15-Apr-07 22:26
ytfrdfiw15-Apr-07 22:26 
GeneralRe: how can i debug my dll in officexp Pin
toxcct15-Apr-07 22:29
toxcct15-Apr-07 22:29 
GeneralRe: how can i debug my dll in officexp Pin
ytfrdfiw15-Apr-07 23:26
ytfrdfiw15-Apr-07 23:26 
GeneralRe: how can i debug my dll in officexp Pin
Gospodin Baron15-Apr-07 23:47
Gospodin Baron15-Apr-07 23:47 
GeneralRe: how can i debug my dll in officexp Pin
ytfrdfiw26-Mar-10 3:16
ytfrdfiw26-Mar-10 3:16 
Questionscope in functions Pin
minkowski15-Apr-07 21:21
minkowski15-Apr-07 21:21 
Hi
If I have the function

<br />
int * foo()<br />
{<br />
   int x = 6;<br />
   int * ptr = &x;<br />
   return ptr;<br />
<br />
}<br />
<br />
<br />


I was wondering how this works because the local variable x is destroyed upon leaving the function so doesn'nt the pointer ptr be invalid? Also, is the copy constructor called in returning ptr? And is ptr destroyed upon leaving the function since that goes out of scope too?

Thanks for any answers.
AnswerRe: scope in functions Pin
Programm3r15-Apr-07 21:26
Programm3r15-Apr-07 21:26 
AnswerRe: scope in functions Pin
CPallini15-Apr-07 21:34
mveCPallini15-Apr-07 21:34 
GeneralRe: scope in functions Pin
minkowski15-Apr-07 21:39
minkowski15-Apr-07 21:39 
GeneralRe: scope in functions Pin
cp987615-Apr-07 21:50
cp987615-Apr-07 21:50 
GeneralRe: scope in functions Pin
minkowski15-Apr-07 21:54
minkowski15-Apr-07 21:54 
GeneralRe: scope in functions Pin
toxcct15-Apr-07 22:12
toxcct15-Apr-07 22:12 
GeneralRe: scope in functions Pin
CPallini15-Apr-07 22:05
mveCPallini15-Apr-07 22:05 
GeneralRe: scope in functions Pin
minkowski15-Apr-07 22:12
minkowski15-Apr-07 22:12 
GeneralRe: scope in functions Pin
toxcct15-Apr-07 22:15
toxcct15-Apr-07 22:15 
GeneralRe: scope in functions Pin
CPallini15-Apr-07 22:53
mveCPallini15-Apr-07 22:53 
GeneralRe: scope in functions Pin
toxcct16-Apr-07 10:01
toxcct16-Apr-07 10:01 
GeneralRe: scope in functions Pin
CPallini16-Apr-07 11:12
mveCPallini16-Apr-07 11:12 
AnswerRe: scope in functions Pin
BadKarma15-Apr-07 22:11
BadKarma15-Apr-07 22:11 
GeneralRe: scope in functions Pin
minkowski15-Apr-07 22:20
minkowski15-Apr-07 22:20 
GeneralRe: scope in functions Pin
toxcct15-Apr-07 22:25
toxcct15-Apr-07 22:25 
GeneralRe: scope in functions Pin
minkowski15-Apr-07 22:29
minkowski15-Apr-07 22:29 
GeneralRe: scope in functions Pin
toxcct15-Apr-07 22:31
toxcct15-Apr-07 22:31 

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.