hello I’m converting a C# piece of code and am stumped over this line
int arr [] = { 1, 2, 3, 4, 5, 6, 5, 4 };
// Loop over LED's
for (int i = 0; i < Rp1; i++)
{
[b]foreach (int s in arr)[/b] <<<<<<<Does not like this line
{
switch (s)
case 6:
//Console.WriteLine("Light the sixth LED");
break;
case 5:
// Console.WriteLine("Light the Fifth LED");
break;
case 4:
// Console.WriteLine("Light the Fouth LED");
break;
case 3:
// Console.WriteLine("Light the Third LED");
break;
case 2:
// Console.WriteLine("Light the Second LED");
break;
case 1:
// Console.WriteLine("Light the First LED");
break;
case 0:
// Console.WriteLine("Pause ,do nothing");
break;
}
}
}code]
What would be the c++ equivalent?
Thanks
Geoff