delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/06/09/10:21:45

Date: Mon, 9 Jun 1997 10:20:40 -0400 (EDT)
From: "Art S. Kagel" <kagel AT ns1 DOT bloomberg DOT com>
To: Paul Derbyshire <ao950 AT FreeNet DOT Carleton DOT CA>
Cc: djgpp AT delorie DOT com
Subject: Re: char **argv vs. char *argv[]
In-Reply-To: <5ndap9$mgd@freenet-news.carleton.ca>
Message-Id: <Pine.D-G.3.91.970609101852.23601E-100000@dg1>
Mime-Version: 1.0

On 8 Jun 1997, Paul Derbyshire wrote:

> I've seen char **argv and char *argv[] and am curious which is correct. Or
> are either correct?

Either is correct although since I have encountered compilers which 
generate incorrect code for parameters which are arrays I always code 
function parameters as pointers when I will be receiving an array.  
Therefore, in the case of argv, I use 'char **argv' to avoid problems 
porting.

Art S. Kagel, kagel AT bloomberg DOT com

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019