• 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: Reversing a String
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Reversing a String


  • Subject: Re: Reversing a String
  • From: Graham Cox <email@hidden>
  • Date: Wed, 31 Dec 2008 16:35:45 +1100


On 31 Dec 2008, at 4:23 pm, Ron Fleckner wrote:

char reverseChars[stringLength];


Have you tested this? I don't think this is legal - you can't declare a statically sized array with a dynamically computed size. The compiler might let it through because stringLength is declared const, even though it isn't. It might work by chance, but you'll be very close to smashing your stack.

--Graham


_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Reversing a String
      • From: Graham Cox <email@hidden>
References: 
 >Reversing a String (From: "Gabe Shahbazian" <email@hidden>)
 >Re: Reversing a String (From: Ron Fleckner <email@hidden>)

  • Prev by Date: Re: Reversing a String
  • Next by Date: Re: Reversing a String
  • Previous by thread: Re: Reversing a String
  • Next by thread: Re: Reversing a String
  • Index(es):
    • Date
    • Thread