Re: [hackers] [ubase] Style fix for respawn || sin

From: sin <>
Date: Fri, 18 Apr 2014 11:43:19 +0100

On Fri, Apr 18, 2014 at 12:40:26PM +0200, FRIGN wrote:
> On Fri, 18 Apr 2014 12:37:22 +0200
> wrote:
> > -main(int argc, char **argv)
> > +main(int argc, char *argv[])
> Can someone give me a reason why one should be favored over the other?
> I suppose this is just a matter of taste (FYI: I use char **argv).

Matter of taste and makes it a bit more explicit to me that
argv is an array of pointers to chars (and I can treat them as such).

Generally if it was char **p, then depending on the situation p++ might
have been invalid, where as char *p[] you would probably expect that
you can access p[0], p[1] up to a certain number of them.
Received on Fri Apr 18 2014 - 12:43:19 CEST

This archive was generated by hypermail 2.3.0 : Fri Apr 18 2014 - 12:48:20 CEST