NSInteger * count = [monLessonArrayA count]; for (i = 0; i <count; i ++) {arrayVar = [monLessonArrayA objectAtIndex: i]; }
I get an error: I am not declared, how can I set objectAtIndex to i so that I can loop it up every time?
Thank.
Because your self is not declared.
for (int i = 0; i < count; i++)
In addition, you do not need *to NSInteger.
*
NSInteger
NSInteger count = [monLessonArrayA count];
You just forgot to declare i(and its data type) before using it in a loop:
i
for (int i = 0; i < count; i++) {
, :
for (id someObject in monLessonArrayA) { // Do stuff }
Source: https://habr.com/ru/post/1764361/More articles:How to match a vector to a map by clicking on it with duplicate key values? - hashmapJava Box (BoxLayout) doesn't work as expected - javaDesign 360-degree video viewer - interactiveHow does enterprise search display results for the user and hide unauthorized results? - search-enginegdb for debugging double free, not detected valgrind (?) - c ++Anonymous functions pre PHP 5.3.0 - phpСамый обычный метод хранения данных XYZ в MATLAB - matlabDrupal: "previous and next" links in each node? - drupalProblem validation problem model ASP MVC DateTime - datetimePerl metaprogramming: when is it unsafe to use quotemeta for REPLACEMENT s ///? - regexAll Articles