Click here to Skip to main content
15,887,267 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionUrgent! Smart house with SMS project Pin
ericyeoh2-Jun-09 16:33
ericyeoh2-Jun-09 16:33 
QuestionRe: Urgent! Smart house with SMS project Pin
CPallini2-Jun-09 21:39
mveCPallini2-Jun-09 21:39 
QuestionMFC Process Pin
duongcntt4b2-Jun-09 15:39
duongcntt4b2-Jun-09 15:39 
QuestionRe: MFC Process Pin
David Crow2-Jun-09 16:52
David Crow2-Jun-09 16:52 
AnswerRe: MFC Process Pin
Stephen Hewitt2-Jun-09 20:34
Stephen Hewitt2-Jun-09 20:34 
AnswerRe: MFC Process Pin
duongcntt4b2-Jun-09 21:26
duongcntt4b2-Jun-09 21:26 
GeneralRe: MFC Process Pin
David Crow3-Jun-09 2:34
David Crow3-Jun-09 2:34 
QuestionC and C++ malloc and free Pin
jobin0070072-Jun-09 11:59
jobin0070072-Jun-09 11:59 
So , I have this SDK from a manufacturer. They use malloc in their code..and so I have to use it. They use C along with C++ in their SDK.

They do something like this:-

void *ptr;
ptr=malloc(40*50);

pArrivedFrame->GetBytes(ptr); //The bytes I need are referenced to ptr

and I do:

char *b=(unsigned char*)(pFrame); //This is to get the data.

Now my question is how do i free the void ptr?

free(ptr); does not work and results in an exception being thrown. Any help will be appreciated.

Thanks
AnswerRe: C and C++ malloc and free Pin
John R. Shaw2-Jun-09 13:40
John R. Shaw2-Jun-09 13:40 
QuestionHelp compiling a library program in 'C' [modified] Pin
warpbro2-Jun-09 11:11
warpbro2-Jun-09 11:11 
QuestionRe: Help compiling a library program in 'C' Pin
David Crow2-Jun-09 16:54
David Crow2-Jun-09 16:54 
AnswerRe: Help compiling a library program in 'C' Pin
norish2-Jun-09 17:51
norish2-Jun-09 17:51 
GeneralRe: Help compiling a library program in 'C' [modified] Pin
warpbro3-Jun-09 4:13
warpbro3-Jun-09 4:13 
GeneralRe: Help compiling a library program in 'C' Pin
warpbro4-Jun-09 22:22
warpbro4-Jun-09 22:22 
QuestionHow to trace/log 3rd Party library API calls made by an application through WinDbg [modified] Pin
ComplexLifeForm2-Jun-09 8:51
ComplexLifeForm2-Jun-09 8:51 
Questioncalculte time between two dates !!! Pin
pillsforkills2-Jun-09 6:23
pillsforkills2-Jun-09 6:23 
QuestionRe: calculte time between two dates !!! Pin
CPallini2-Jun-09 6:36
mveCPallini2-Jun-09 6:36 
QuestionRe: calculte time between two dates !!! Pin
David Crow2-Jun-09 7:48
David Crow2-Jun-09 7:48 
Questionsha256 test vector Pin
Bill Salibrici2-Jun-09 5:52
Bill Salibrici2-Jun-09 5:52 
QuestionControl CStatic, Height of FONT Pin
durban22-Jun-09 4:28
durban22-Jun-09 4:28 
AnswerRe: Control CStatic, Height of FONT Pin
Hamid_RT2-Jun-09 5:17
Hamid_RT2-Jun-09 5:17 
AnswerRe: Control CStatic, Height of FONT Pin
nyeboy2-Jun-09 6:55
nyeboy2-Jun-09 6:55 
GeneralRe: Control CStatic, Height of FONT Pin
ForNow1-Jul-15 8:08
ForNow1-Jul-15 8:08 
Questionfunction Pin
durban22-Jun-09 4:07
durban22-Jun-09 4:07 
AnswerRe: function Pin
Chris Losinger2-Jun-09 4:10
professionalChris Losinger2-Jun-09 4:10 

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.