JOIN
 Revision History
 Select a Forum     Round Tables New Member Discussions News Discussions Algorithm Matches Marathon Matches NASA Tournament Lab TopCoder Cookbook High School Matches Sponsor Discussions Development Forums Design Forums Search My Post History  |  My Watches  |  User Settings Forums Round Tables General Career Discussions Re: Foiled by a Div2-250! Revision History (3 edits)
 Re: Foiled by a Div2-250! (response to post by d000hg) I'll have go a seeing as I have been a bit picky on everyone else!. Untested so probably incorrect!!```void Func(char *str, int length) {   int last = 0;   for (int i = 0; i <= length; ++i)   if ( *(str + last) != *(str + i)) *(str + (++last)) = *(str + i); *(str + (++last)) = '\0';   } ```
 Re: Foiled by a Div2-250! (response to post by d000hg) I'll have go a seeing as I have been a bit picky on everyone else!.```void Func(char *str, int length) {   int last = 0;   for (int i = 0; i <= length; ++i)   if ( *(str + last) != *(str + i)) *(str + (++last)) = *(str + i); *(str + (++last)) = '\0';   } ```
 Re: Foiled by a Div2-250! (response to post by d000hg) I'll have a seeing as I have been a bit picky on everyone else!.```void Func(char *str, int length) {   int last = 0;   for (int i = 0; *(str + i) != '\0'; ++i)   if ( *(str + last) != *(str + i)) *(str + (++last)) = *(str + i); *(str + (++last)) = '\0';   } ```
 Re: Foiled by a Div2-250! (response to post by d000hg) I'll have a go ..... untested. [cpp]void Func(char *str, int length) { int last = 0; for (int i = 0; *(str + i) != '\0'; ++i) if ( *(str + last) != *(str + i)) *(str + (++last)) = *(str + i); *(str + (++last)) = '\0';}[\cpp]