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"; } } }
0 Resposta
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"; } } }