Try CFMutableSet
so how whould i chec to c if a number has already been called?
You're on the right path. I'll assume that "calledNumbers" is some kind of container. That container has the "contains()" method defined on it.
The equivalent iOS container is likely CFMutableSet (a subclass of CFSet). Look it up (
here) and see if it works for you. You can probably get away with using int's because it stores (and likely compares) pointers (as "void *").
I don't like that pointer comparison thing, since two objects that happen to be equal will not compare as equal when you compare pointers to these apparently equal values, but as long as you know going in it can be ok.
if you have a CFMutableSet bob and int newRandomValue, you can use CFSetContainsValue(bob, (void *)newRandomValue) to test if the element exists in the set, and you can add it into the set by using CFSetAddValue(bob,(void*)newRandomValue).
No guarantees on this; give it a spin and see what happens.
Ron