Re: Clunky C cleanup code
From: Mike Wahler (mkwahler_at_mkwahler.net)
Date: 11/30/04
- Next message: tomek: "Linux, Sockets and C"
- Previous message: Merrill & Michele: "Re: Clunky C cleanup code"
- In reply to: Merrill & Michele: "Re: Clunky C cleanup code"
- Next in thread: Merrill & Michele: "Re: Clunky C cleanup code"
- Reply: Merrill & Michele: "Re: Clunky C cleanup code"
- Reply: Richard Bos: "Re: Clunky C cleanup code"
- Reply: Merrill & Michele: "Re: Clunky C cleanup code"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 30 Nov 2004 16:17:49 GMT
"Merrill & Michele" <beckjensen@comcast.net> wrote in message
news:b9ednbQ_rqXmATHcRVn-tw@comcast.com...
>
> > "fatted"
> > I've written a function (clean_string) to remove characters from a
string,
> > but it looks clunky to me, and I'm sure there's a more 'C' like way of
> > doing it (still learning), comments and advice welcome...
> >
> > --
> > #include <stdio.h>
> > #include <stdlib.h>
> > #include <string.h>
> >
> > int main(void)
> > {
> > char * clean_string(const char *, const
> [single point to make, rest of post snipped]
>
> I get routinely chastised for defining functions inside of main().
OP's code did not contain any function definitions inside of main
or any other function.
-Mike
- Next message: tomek: "Linux, Sockets and C"
- Previous message: Merrill & Michele: "Re: Clunky C cleanup code"
- In reply to: Merrill & Michele: "Re: Clunky C cleanup code"
- Next in thread: Merrill & Michele: "Re: Clunky C cleanup code"
- Reply: Merrill & Michele: "Re: Clunky C cleanup code"
- Reply: Richard Bos: "Re: Clunky C cleanup code"
- Reply: Merrill & Michele: "Re: Clunky C cleanup code"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]