On Fri, Apr 18, 2014 at 12:40:26PM +0200, FRIGN wrote:
> On Fri, 18 Apr 2014 12:37:22 +0200
> [email protected] 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.

Reply via email to