• 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: A bit confused
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: A bit confused


  • Subject: Re: A bit confused
  • From: Prachi Gauriar <email@hidden>
  • Date: Thu, 17 Jun 2004 14:19:33 -0500

On Jun 17, 2004, at 4:52 AM, Michael Curtis wrote:

Hi,

I am sorry about this newbie question, but I am getting a bit
confused. I am making an array and filling it with random numbers. This
works fine. I then want to check that array to make sure that the
number added is not already in there.

I am having trouble return the number out of the array. This is the
error I get.


Although this isn't strictly related to your problem, why are you using an array instead of a set? I'm assuming by array you mean an NSArray. So why not use an NSSet instead? It doesn't allow for duplicates, and if they're random numbers, I'm not sure whether the ordering is important or not for your case. Anyway, it's something to think about if you don't really care about the order.

-Prachi
_______________________________________________
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: A bit confused
      • From: Michael Curtis <email@hidden>
References: 
 >A bit confused (From: Michael Curtis <email@hidden>)

  • Prev by Date: Re: sin(4*pi^2*t) 0 >= t <= pi/3, can you read this ?
  • Next by Date: Re: Authenticating without UI
  • Previous by thread: Re: A bit confused
  • Next by thread: Re: A bit confused
  • Index(es):
    • Date
    • Thread