| |||
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
On 11/27/03 12:24 PM, ai cui didst favor us with:
my code doesn't work well in Xcode:
int *p1;
int *p2;
*p=200; // EXC_BAD_ACCESS occur when debuging
So, is there a real POINTER data type in Carbon?
Of course there's a pointer data type in Carbon. Did you consider what it's
pointing to?
Why is it so weird when use it?
Because you're writing sizeof(int) bytes out to a random location in memory.
You have to allocate storage to which the pointer points. This isn't an
XCode issue, it's a programming issue.
| Home | Archives | FAQ | Terms/Conditions | Contact | RSS | Lists | About |
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE
Contact Apple | Terms of Use | Privacy Policy
Copyright © 2007 Apple Inc. All rights reserved.