Re: Corrupted NSMutableString
Re: Corrupted NSMutableString
- Subject: Re: Corrupted NSMutableString
- From: Shawn Erickson <email@hidden>
- Date: Fri, 1 Aug 2003 20:49:36 -0700
On Friday, August 1, 2003, at 06:38 PM, Cameron Hayne wrote:
On 28/7/03 4:08 PM, "Matthew" <email@hidden> wrote:
short int * zeroCalibrations[*numOfChannels];
short int * gainCalibrations[*numOfChannels];
short int trial[*numOfChannels];
I know this isn't what you are asking about - but what are those arrays
doing getting declared with what appears to be a variable?
This is not valid C code (or Obj-C code) - you must declare arrays with
sizes that are known at compile time. I recall that gcc might allow
this
sort of thing - but it should not.
If you want dynamically sized arrays, you should allocate them. Or use
NSArray, etc.
No the doing the above is valid in C (as of C99). You can do it if you
want.
-Shawn
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.