Creating a two dimensional array in Objective-C

后端 未结 6 513
Happy的楠姐
Happy的楠姐 2020-12-01 09:46

Whats the easiest way to declare a two dimensional array in Objective-C? I am reading an matrix of numbers from a text file from a website and want to take the data and pla

6条回答
  •  隐瞒了意图╮
    2020-12-01 09:58

    Hope this helps. This is just example how you can initial 2d array of int in code (Objective C works)

    int **p;
    p = (int **) malloc(Nrow*sizeof(int*));
    for(int i =0;i

提交回复
热议问题