how has C bitten you?

Peter da Silva peter at graffiti.UUCP
Tue Sep 3 21:44:52 AEST 1985


> > Not really a bite, but I remember when I was first learning C
> > I was quite bewildered by the fact that you couldn't really
> > declare your own 'argv', that is, you couldn't declare an
> > array of pointers to fixed length buffers except perhaps by:
> > 
> > char *myargv[] = {
> > 	"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0",
> > 	"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0",
> > 

What are you talking about?

char *myargv[5] = { "/bin/sh", "sh", "-c", "echo 'well it worked'", NULL };

What's so holy about this?



More information about the Comp.unix.wizards mailing list