I want to use a variable-sized multi-dimensional array in my app to save data. The data structure I want to use is as below, the first element in each row is followed by corresponding multiple values.
array = { {a, a_val1, a_val2, a_val3}.
{b, b_val1},
{c, c_val1, c_val2, c_val3, c_val4, c_val5}
}
Any idea how I can implement in objective-c?
Objective-C does not have a real 2 dimensional array type but you can implement it with the
following codes..
in your header file — yourheader.h
Now add to your objective-c file —- objective-c.m
To finish add this to your appdelegate.m file inside the app
You should see it in you console.