ios - 2D array declaration in Objective-C++ error -
i'm developing ios application latest sdk.
i want create int [][]
in objective-c++ don't know how it:
this piece of myclass.mm
:
static const int max_num_detections = 10; static const int patch_size = 100; @interface myclass () { int[max_num_detections][patch_size*patch_size] _results; } @end
that line of code generate 2 errors:
expected member name or ';' after declaration specifiers.
expected ';' @ end of declaration list
i error under _
character.
how can declare , initialize 2d array?
you need put [][]
brackets after variable name:
eg:
int multiarr[3][4];
Comments
Post a Comment