I need a nice old-fashioned 2-dimensional array of integers in my program, but no matter how I try to declare it as ivar and then use @ property / @ synhesize, I get one compiler complaint or the other.
I declare
int spotLocations[10] [10]
like ivar.
This works, but then the @ property / @ synhesize process never passes.
. Array variabless lvalues ββ C, , , , ( lvalue).
- , . , , .
, , lvalues:
typedef struct { int value[10][10]; } matrix;
...
@property matrix spotLocations;
, ,
spotLocations.value[x][y]
, init. @property.
:
spotLocations = malloc(100 * sizeof(int));
int aValue = spotLocations[x + y * 10];
() , .
Source: https://habr.com/ru/post/1724516/More articles:How can I simplify this ocaml pattern matching code? - pattern-matchingGetting cities and countries from NSTimeZone - iphoneSilverlight - snap an image using https - silverlightDownload the file from any URL and save it to my computer using ASP.NET. - fileOracle COLLECT function creates a new collection data type with a random name - oracleOpenCV and Xcode - c ++Using SQL Server Express instead of Compact Edition as a local database cache? - sql-serverWhich WCF binding is most effective? - performanceto check processor type during RUN for program C on MAC - endiannessFacebook application: saving thumbnails of user photos - facebookAll Articles