How to create an Array of Strings in Objective c for iphone

后端 未结 4 1003
深忆病人
深忆病人 2020-12-30 19:48

I\'m trying to create an array of strings that can be randomized and limited to a certain x number of strings.

If the array could be randomized I could pick the firs

4条回答
  •  独厮守ぢ
    2020-12-30 20:25

    All C auto arrays like that will be full of garbage until you fill them. As long as it isn't getting filled with garbage later, everything is working as expected. However, Cocoa includes the NSArray class which is more common to use for arrays of objects (since it does proper memory management and works with the rest of the framework and all that).

提交回复
热议问题