次のコードを使用してc配列を定義しています(警告以外はうまく機能します):
.hファイル:
@interface memory : NSObject
{
int places[60];
int lastRecordSound;
}
@property int *places;
それから私の中で私.m
はそれを同期していません(そしてそれは動作します)が、私がそれを同期しようとすると:
@synthesize places;
エラーが発生します:
type of preperty "places does not match type of ivar places (int[60] )
そうでない場合は、警告が表示されます:
auto synthesized property places will be use synthesized instance variable _places...
では、このc配列を定義する最良の方法は何ですか?(はい、cが必要です..)