jeudi 4 août 2016

Calling custom objects whose names contain numbers in Objective-c

I have declared custom objects in Objective-c project:

Student* student1 = [[Student alloc]init];
Student* student2 = [[Student alloc]init];
Student* student3 = [[Student alloc]init];
Student* student4 = [[Student alloc]init];
Student* student5 = [[Student alloc]init];
Student* student6 = [[Student alloc]init];

How can I call them in cycle

for (int i=1; i<=6; i++)
{
} ?

Aucun commentaire:

Enregistrer un commentaire