0

come from a Java background to this Objective-c compiler error. Why can't I specify the length of the byte array?

NSUInteger length = modul.length;
Byte d[length] = {0};//compiler error: Variable-sized object may not be initialized
Kuldeep
  • 4,466
  • 8
  • 32
  • 59
miracle-doh
  • 596
  • 1
  • 4
  • 19

1 Answers1

0

looks like I can just do memset(d, 0,5*sizeof(int)); to initialize it..

miracle-doh
  • 596
  • 1
  • 4
  • 19