Re: How to store C Arrays as a Property or iVar?


Alex Zavatone
 

You can save them as NSIntegers in an NSMutableArray.

The thing about NSDictionaries and NSArrays is that they need to contain NSObjects that are Cocoa Collections.


Someone please correct me if I’m tragically misguided.

But try that, Dave.

Cheers,
Alex Zavatone

On Aug 18, 2017, at 2:07 PM, Dave <dave@...> wrote:

Hi All,

I’ve converted some C code into Objective-C and have some C Array structures like so:

int [10][10]) myArray;

That I want to store in a Property or iVar inside a Wrapper Class. How do I do this?

I’ve tried:


@interface WrapperClass : NSObect
{
int [10][10]) mArray;
}

But I get an error if I try to assign or read it, as in:

myArray = _mArray;

or

_mArray =  myArray;


Thanks a lot
All the Best
Dave





Join {cocoa@apple-dev.groups.io to automatically receive all group messages.