0

我将值声明为一组静态字符,

   static char month[][15]={"January","February","March","April","May","June", "July","August","September","October","November","December"};

现在,我想在定义的字符月 [15] 中访问索引 5 中的值;

在objective-c中怎么可能?帮我。

4

1 回答 1

2

您可以使用 , month[index]访问它

NSLog(@"%s",month[5]);

与您在C中使用 char 数组相同。

于 2013-09-26T11:10:59.113 回答