Re: Pointers and arrays
Re: Pointers and arrays
- Subject: Re: Pointers and arrays
- From: Michael <email@hidden>
- Date: Mon, 16 Oct 2006 15:08:14 -0700
On Oct 16, 2006, at 3:06 PM, Joachim Deelen wrote:
Hi!
consider the following code:
int main (int argc, const char * argv[]) {
// insert code here...
int i[10];
sub(i);
return 0;
}
void sub(int *aI) {
int i;
for (i = 0; i < 9; i++) {
aI[i] = i;
}
}
I think, you will watch how the array "aI" gets filled within the
function "sub(int *aI)".
Set a breakpoint at "aI[i] = i". Then in the debugger Window, where
the "int *" gets displayed with the address-value of "aI", open the
Context-Menu and select "View Value as...". Change "int *" to "int
[10] *" an press OK (replace [10] with your array size).
Now "aI" gets displayed in a separate Window. Select the small
triangles, to open the tree. After opening the second triangle,
you'll see all the elements of your array!
Hope this Helps
It does ...thanks.
Joachim
_______________________________________________
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