objective-c nsarray to c array
问题 Sorry, I'm not even sure how to ask, since I'm a complete newbie at C, pointers and stuff like that. There's a function that accepts an argument: char **arg . If I write that argument like so: char *cargs[] = {"blah", NULL}; and pass it to the function: function(cargs); it works. but ... I have an NSArray of NSStrings and I need to make this array out of values from NSArray . I figured it should be a matter of creating a C array of the same element count as NSArray and copy the strings,