Re: Pointers and arrays
Re: Pointers and arrays
- Subject: Re: Pointers and arrays
- From: "Justin C. Walker" <email@hidden>
- Date: Sun, 15 Oct 2006 14:06:39 -0700
On Oct 15, 2006, at 13:24 , Michael wrote:
Laurence Harris wrote:
Do you really need to pass a pointer to i instead of i itself?
Larry
I am passing i itself. The debugger changes this to a pointer. That
seems to be the problem.
I'm not sure what you want. In C/C++, arrays are passed as
references (i.e., pointers), so if you have
int i[1100];
Ralph(i);
inside Ralph(), i will be an "int *" (or, equivalently, "int i[]").
The compiler does this, not the debugger. In C, arrays *are*
pointers; they really aren't "first-class types".
Justin
--
Justin C. Walker, Curmudgeon-At-Large
Institute for the Absorption of Federal Funds
--------
Men are from Earth.
Women are from Earth.
Deal with it.
--------
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden