Can anyone recommend a good c programming newsgroup for general questions
and queries. NH
--
>From: Sam Bayne <[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED]
>Subject: Re: C programming question...[OT]
>Date: Fri, May 5, 2000, 3:42 am
>
>First of all, thank everyone
Sam Bayne wrote:
> Hee hee, perl doesn't have pointers, but it DOES have references.
Really? I thought those were new in Perl 5.6.
> they have some idiot protections WRT segfault.) The thing that is really
> confusing about C's pointers is not the "they're memory locations"
> thing,
> it's the
On Fri, May 05, 2000 at 01:24:30PM -0400, rpjday wrote:
> On Fri, 5 May 2000, Ken Gosier wrote:
>
> >
> > --- Steve Borho <[EMAIL PROTECTED]> wrote:
> > > Speaking to just pure style, though, that while loop
> > > reminds me of the
> > > most efficient C snippet I've ever seen. It's the
> > > s
On Fri, 5 May 2000, Ken Gosier wrote:
>
> --- Steve Borho <[EMAIL PROTECTED]> wrote:
> > Speaking to just pure style, though, that while loop
> > reminds me of the
> > most efficient C snippet I've ever seen. It's the
> > standard implementation
> > of strcpy.
> >
> > for (;*s;)
> >
> --- Steve Borho <[EMAIL PROTECTED]> wrote:
> > Speaking to just pure style, though, that while loop
> > reminds me of the
> > most efficient C snippet I've ever seen. It's the
> > standard implementation
> > of strcpy.
> >
> > for (;*s;)
> > *d++ = *s++;
>
>
> One question about th
--- Steve Borho <[EMAIL PROTECTED]> wrote:
> Speaking to just pure style, though, that while loop
> reminds me of the
> most efficient C snippet I've ever seen. It's the
> standard implementation
> of strcpy.
>
> for (;*s;)
> *d++ = *s++;
One question about this code snippet: Won't
First of all, thank everyone for helping me out with idiotic basic
questions.
Gordon Messmer wrote:
>
> 1) No, the programmers declared an array of 5 character pointers, not
> an array of 5 characters. Perl 5 doesn't have pointers, so I understand
> your confusion :) They're one of the things
> #define MAXARG 4
> static char *dirs[MAXARG+1];
a 5 element array of pointers to characters (strings).
> ac--; av++;
> if (ac==0) dirs[0] = "/tftpboot"; /* default directory */
> while (ac-- > 0 && n < MAXARG)
> dirs[n++] = *av++;
> 1
On Thu, May 04, 2000 at 05:23:37PM -0700, Sam Bayne wrote:
> while (ac-- > 0 && n < MAXARG)
> dirs[n++] = *av++;
>
> 3. Stylistically, is that 'while' statement normal? It looks to
> me like a syntax mistake waiting to happen, but I'll code
> to th
1) No, the programmers declared an array of 5 character pointers, not
an array of 5 characters. Perl 5 doesn't have pointers, so I understand
your confusion :) They're one of the things that non-C programmers
bitch about. (If you don't understand pointers, using them is a quick
way to a segfau
On Thu, May 04, 2000 at 05:23:37PM -0700, Sam Bayne wrote:
> So There I am, rooting around in the source to the tftpd server
> (never you mind why) when I see this:
>
> -
> #define MAXARG 4
> static char *dirs[MAXARG+1];
>
> int
> main(int ac, char *
So There I am, rooting around in the source to the tftpd server
(never you mind why) when I see this:
-
#define MAXARG 4
static char *dirs[MAXARG+1];
int
main(int ac, char **av)
{
register struct tftphdr *tp;
register int n = 0;
12 matches
Mail list logo