0

Is it possible to declare a int array property in app delegate?

int myArray[12];
user3626407
  • 287
  • 1
  • 6
  • 15
  • No you can't, but you can use Objective-C++ structures. Then you will be able to use std::vector structure. See: http://stackoverflow.com/questions/3684112/what-is-objective-c – Szu Aug 07 '14 at 09:07

1 Answers1

1

Objective-C does not support C array properties.

Your best option is to use an NSArray property instead. If you really need a C array to be accessible from outside, use an int * property and a size_t count property for the number of elements.

Nikolai Ruhe
  • 81,520
  • 17
  • 180
  • 200