Click here to Skip to main content
15,887,485 members
Home / Discussions / ATL / WTL / STL
   

ATL / WTL / STL

 
GeneralRe: write a C program to find the area and perimeter of a circle? Pin
valyvachouama3-Mar-11 20:32
valyvachouama3-Mar-11 20:32 
GeneralRe: write a C program to find the area and perimeter of a circle? Pin
Richard MacCutchan3-Mar-11 22:11
mveRichard MacCutchan3-Mar-11 22:11 
AnswerRe: write a C program to find the area and perimeter of a circle? Pin
Stephen Hewitt4-Mar-11 17:03
Stephen Hewitt4-Mar-11 17:03 
Questionfreeing pointers in pointer array causes SegFault [solved] Pin
Jordanwb27-Feb-11 9:03
Jordanwb27-Feb-11 9:03 
AnswerRe: freeing pointers in pointer array causes SegFault Pin
Cool_Dev27-Feb-11 19:06
Cool_Dev27-Feb-11 19:06 
AnswerRe: freeing pointers in pointer array causes SegFault Pin
Richard MacCutchan27-Feb-11 23:01
mveRichard MacCutchan27-Feb-11 23:01 
GeneralRe: freeing pointers in pointer array causes SegFault Pin
Jordanwb28-Feb-11 4:18
Jordanwb28-Feb-11 4:18 
GeneralRe: freeing pointers in pointer array causes SegFault Pin
Richard MacCutchan28-Feb-11 6:10
mveRichard MacCutchan28-Feb-11 6:10 
So you are adding a pointer to a constant string which you later try to free(): result SEGV fault. You need to ensure that every pointer you pass into list_add() is pointing to a memory block that has been returned from malloc(). something like:
List *list = list_create();
char* pitem = (char*)malloc(10);
strcpy(pitem, "Hello");
list_add (list, pitem);
// pitem may now be removed with a call to free()
list_dealloc (list);

I must get a clever new signature for 2011.

GeneralRe: freeing pointers in pointer array causes SegFault Pin
Jordanwb28-Feb-11 6:57
Jordanwb28-Feb-11 6:57 
QuestionMAPI: MapiRecipDesc is not properly working with Lotus Notes (ver8.5) [modified] Pin
vinvino200122-Feb-11 2:55
vinvino200122-Feb-11 2:55 
AnswerRe: MAPI: MapiRecipDesc is not properly working with Lotus Notes (ver8.5) Pin
vinvino200123-Feb-11 20:17
vinvino200123-Feb-11 20:17 
QuestionFunction pointer syntax help Pin
Xpnctoc19-Feb-11 17:38
Xpnctoc19-Feb-11 17:38 
AnswerRe: Function pointer syntax help Pin
Alain Rist19-Feb-11 20:19
Alain Rist19-Feb-11 20:19 
GeneralRe: Function pointer syntax help Pin
Xpnctoc20-Feb-11 10:15
Xpnctoc20-Feb-11 10:15 
AnswerRe: Function pointer syntax help Pin
Yusuf20-Feb-11 1:45
Yusuf20-Feb-11 1:45 
AnswerSOLVED: Re: Function pointer syntax help Pin
Xpnctoc20-Feb-11 10:29
Xpnctoc20-Feb-11 10:29 
GeneralRe: SOLVED: Re: Function pointer syntax help Pin
Albert Holguin20-Feb-11 11:26
professionalAlbert Holguin20-Feb-11 11:26 
GeneralRe: SOLVED: Re: Function pointer syntax help Pin
Xpnctoc20-Feb-11 12:36
Xpnctoc20-Feb-11 12:36 
GeneralRe: SOLVED: Re: Function pointer syntax help Pin
Michael Dunn20-Feb-11 21:43
sitebuilderMichael Dunn20-Feb-11 21:43 
GeneralRe: SOLVED: Re: Function pointer syntax help Pin
Xpnctoc21-Feb-11 4:15
Xpnctoc21-Feb-11 4:15 
GeneralRe: SOLVED: Re: Function pointer syntax help Pin
Albert Holguin21-Feb-11 10:51
professionalAlbert Holguin21-Feb-11 10:51 
GeneralRe: SOLVED: Re: Function pointer syntax help Pin
Xpnctoc21-Feb-11 10:56
Xpnctoc21-Feb-11 10:56 
GeneralRe: SOLVED: Re: Function pointer syntax help Pin
Albert Holguin21-Feb-11 10:56
professionalAlbert Holguin21-Feb-11 10:56 
GeneralRe: SOLVED: Re: Function pointer syntax help Pin
Xpnctoc21-Feb-11 10:59
Xpnctoc21-Feb-11 10:59 
GeneralRe: SOLVED: Re: Function pointer syntax help Pin
Albert Holguin21-Feb-11 15:18
professionalAlbert Holguin21-Feb-11 15:18 

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.