Click here to Skip to main content
15,896,269 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Allocate memory inside function ?? Pin
Cedric Moonen14-Mar-07 22:15
Cedric Moonen14-Mar-07 22:15 
GeneralRe: Allocate memory inside function ?? Pin
fx920014-Mar-07 22:34
fx920014-Mar-07 22:34 
GeneralRe: Allocate memory inside function ?? Pin
David Crow15-Mar-07 2:56
David Crow15-Mar-07 2:56 
GeneralRe: Allocate memory inside function ?? Pin
toxcct14-Mar-07 22:41
toxcct14-Mar-07 22:41 
GeneralRe: Allocate memory inside function ?? Pin
fx920014-Mar-07 22:46
fx920014-Mar-07 22:46 
GeneralRe: Allocate memory inside function ?? Pin
toxcct14-Mar-07 22:55
toxcct14-Mar-07 22:55 
GeneralRe: Allocate memory inside function ?? Pin
fx920014-Mar-07 22:57
fx920014-Mar-07 22:57 
AnswerRe: Allocate memory inside function ?? Pin
prasad_som14-Mar-07 22:56
prasad_som14-Mar-07 22:56 
Though, its not applicable in C context. You need to understand theory behind Cedric's suggesstion.
In you original code, you was passing pointer argument. Though its a pointer, it will be passed by value, and inside that function, memory allocated will be not at address you expected.

In that case you need to pass pointer to pointer, as shown in my previous reply.




GeneralRe: Allocate memory inside function ?? Pin
fx920014-Mar-07 23:07
fx920014-Mar-07 23:07 
QuestionRe: Allocate memory inside function ?? Pin
prasad_som14-Mar-07 23:12
prasad_som14-Mar-07 23:12 
AnswerRe: Allocate memory inside function ?? Pin
fx920014-Mar-07 23:22
fx920014-Mar-07 23:22 
AnswerRe: Allocate memory inside function ?? Pin
prasad_som14-Mar-07 23:28
prasad_som14-Mar-07 23:28 
GeneralRe: Allocate memory inside function ?? Pin
fx920014-Mar-07 23:37
fx920014-Mar-07 23:37 
GeneralRe: Allocate memory inside function ?? Pin
Roger Stoltz15-Mar-07 0:43
Roger Stoltz15-Mar-07 0:43 
AnswerRe: Allocate memory inside function ?? Pin
fx920014-Mar-07 22:56
fx920014-Mar-07 22:56 
GeneralRe: Allocate memory inside function ?? Pin
fx920014-Mar-07 23:15
fx920014-Mar-07 23:15 
QuestionRun exe from mfc Pin
jeepoo14-Mar-07 21:25
jeepoo14-Mar-07 21:25 
AnswerRe: Run exe from mfc Pin
prasad_som14-Mar-07 21:38
prasad_som14-Mar-07 21:38 
AnswerRe: Run exe from mfc Pin
ThatsAlok14-Mar-07 22:42
ThatsAlok14-Mar-07 22:42 
GeneralRe: Run exe from mfc Pin
Hamid_RT15-Mar-07 19:18
Hamid_RT15-Mar-07 19:18 
GeneralRe: Run exe from mfc Pin
ThatsAlok15-Mar-07 20:37
ThatsAlok15-Mar-07 20:37 
GeneralRe: Run exe from mfc Pin
Hamid_RT16-Mar-07 0:40
Hamid_RT16-Mar-07 0:40 
GeneralRe: Run exe from mfc Pin
ThatsAlok16-Mar-07 0:43
ThatsAlok16-Mar-07 0:43 
GeneralRe: Run exe from mfc Pin
Hamid_RT16-Mar-07 0:59
Hamid_RT16-Mar-07 0:59 
GeneralRe: Run exe from mfc Pin
ThatsAlok16-Mar-07 1:03
ThatsAlok16-Mar-07 1:03 

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.