Re: gcc not compiling

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 31 Oct 2005, Sjoerd Mullender wrote:

> Derek Martin wrote:
> > On Mon, Oct 31, 2005 at 01:30:44PM -0600, STYMA, ROBERT E (ROBERT) wrote:
> >
> >>The syntax:
> >>int main(int argc, char **argv)
> >>works, but most of the C books I have seen recommend
> >>the *argv[] version.
> >
> >
> > I meant to comment that these two different notations are functionally
> > identical; an array name is nothing more than a pointer.  For example,
> > if we have the following code:
>
> Not true.  Or rather, only partially true.
> In a variable declaration the two are *not* equivalent.  In a parameter
> declaration and in an expression, the two *are* equivalent.

Not in all expressions.
sizeof(array) is usually not sizeof(&array[0])

See me trim.

-- 
Mike   hennebry@xxxxxxxxxxxxxxxxxxxxx
"I AM DEATH, NOT TAXES.  *I* ONLY TURN UP ONCE."  --  Death


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux