0

What is the meaning of "int y : x" here, in the for loop?

int main() { int x[5] = {1,2,3,4,5}; for(int y : x) { switch(y) { case 1 : cout<<"C"; case 2 : cout<<"P"; case 3 : cout<<"P"; } } }

7th Jul 2017, 6:15 AM
Kushagra Agarwal
Kushagra Agarwal - avatar
0 Antworten