I need to add a double array (as in double example[number of capacity];) to a nsmutablearray, but it seems it's harder than I thought. So I have:
NSMutableArray *sample;
double ex[2];
as a global variable in my .m file
and in void method with two double paramaters which are example1 and example2 I am trying to
ex[0] = example1;
ex[1] = example2;
then add this ex array to nsmutablearray, however, I am getting error if I do this:
[sample addObject:ex];
somebody please help, I am also a newbie to this so I don't have much idea how. Thanks in advance!
I feel like I am not explaining myself that clear so I'll add this.
So basically, I want my mutablearray to look like this:
[[3.78,2.00], [4.6,8.90098], [67.9099, 56.788] ...]
like that
exarray have to be a C array or can it be anNSArrayorNSMutableArray?{ }denotes a dictionary, not an array.