• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Corrupted NSMutableString
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: Corrupted NSMutableString
      • From: Cameron Hayne <email@hidden>
References: 
 >Re: Corrupted NSMutableString (From: Cameron Hayne <email@hidden>)

  • Prev by Date: Re: Learning Mac programming (Cocoa) more...
  • Next by Date: Re: Learning Mac programming (Cocoa) more...
  • Previous by thread: Re: Corrupted NSMutableString
  • Next by thread: Re: Corrupted NSMutableString
  • Index(es):
    • Date
    • Thread