Click here to Skip to main content
15,893,381 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Problem debugging an app with VC++ Pin
Chris Losinger15-Nov-09 15:06
professionalChris Losinger15-Nov-09 15:06 
GeneralRe: Problem debugging an app with VC++ Pin
timbk15-Nov-09 15:24
timbk15-Nov-09 15:24 
GeneralRe: Problem debugging an app with VC++ Pin
Richard MacCutchan15-Nov-09 21:36
mveRichard MacCutchan15-Nov-09 21:36 
GeneralRe: Problem debugging an app with VC++ Pin
timbk17-Nov-09 13:29
timbk17-Nov-09 13:29 
GeneralRe: Problem debugging an app with VC++ Pin
Richard MacCutchan17-Nov-09 21:24
mveRichard MacCutchan17-Nov-09 21:24 
Questionhow to draw a DiagonalDown line in word cell using vc++ 6 Pin
yugiant15-Nov-09 4:36
yugiant15-Nov-09 4:36 
QuestionNot able to use the pointer to a dynamic allocated memory as a function parameter Pin
George Nistor14-Nov-09 22:51
George Nistor14-Nov-09 22:51 
AnswerRe: Not able to use the pointer to a dynamic allocated memory as a function parameter Pin
LunaticFringe14-Nov-09 23:10
LunaticFringe14-Nov-09 23:10 
The parameters need to be passed as references (e.g., void GetPtrEx2(char*& ptOut)).

As it is, you're making a local copy of the parameter in the function bodies and are manipulating that local copy. The variable in your main function is unchanged after calling GetPtrEx because only the local copy inside the accessor was modified.

In order to have changes inside the accessor preserved and made available to the caller, the parameters must be passed as references. In effect, this passes the address of the original variable, rather than making a local copy. Changes made in the accessor will affect the original copy of the variable declared outside the accessor.

Also, in the future, use the 'code block' button above the edit window when posting code. It makes it much more readable; a lot of people here won't even respond to a message loaded with unformatted code.

Wink | ;)
AnswerRe: Not able to use the pointer to a dynamic allocated memory as a function parameter Pin
Richard MacCutchan15-Nov-09 1:20
mveRichard MacCutchan15-Nov-09 1:20 
Questionbrother, help me please! Pin
nenfa14-Nov-09 22:44
nenfa14-Nov-09 22:44 
AnswerRe: brother, help me please! Pin
Code-o-mat15-Nov-09 0:38
Code-o-mat15-Nov-09 0:38 
GeneralRe: brother, help me please! Pin
nenfa15-Nov-09 2:31
nenfa15-Nov-09 2:31 
GeneralRe: brother, help me please! Pin
Code-o-mat15-Nov-09 2:59
Code-o-mat15-Nov-09 2:59 
GeneralRe: brother, help me please! Pin
nenfa15-Nov-09 3:02
nenfa15-Nov-09 3:02 
GeneralRe: brother, help me please! Pin
Code-o-mat15-Nov-09 3:06
Code-o-mat15-Nov-09 3:06 
GeneralRe: brother, help me please! Pin
nenfa15-Nov-09 3:14
nenfa15-Nov-09 3:14 
GeneralRe: brother, help me please! Pin
Code-o-mat15-Nov-09 3:19
Code-o-mat15-Nov-09 3:19 
AnswerRe: brother, help me please! Pin
Richard MacCutchan15-Nov-09 1:27
mveRichard MacCutchan15-Nov-09 1:27 
GeneralRe: brother, help me please! [modified] Pin
nenfa15-Nov-09 2:51
nenfa15-Nov-09 2:51 
GeneralRe: brother, help me please! Pin
Richard MacCutchan15-Nov-09 3:44
mveRichard MacCutchan15-Nov-09 3:44 
GeneralRe: brother, help me please! Pin
nenfa15-Nov-09 4:29
nenfa15-Nov-09 4:29 
QuestionRe: brother, help me please! Pin
David Crow16-Nov-09 3:02
David Crow16-Nov-09 3:02 
AnswerRe: brother, help me please! Pin
nenfa17-Nov-09 21:23
nenfa17-Nov-09 21:23 
QuestionUnable to run openCV program in VS C++ !!! Pin
csetopper_bhanu14-Nov-09 22:21
csetopper_bhanu14-Nov-09 22:21 
AnswerRe: Unable to run openCV program in VS C++ !!! Pin
Richard MacCutchan15-Nov-09 1:29
mveRichard MacCutchan15-Nov-09 1:29 

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.