I was programming right now and I wanted to modify the value of ten variables that shared their name but had a different index at the end. For example:
int number1
int number2
int number3
int number4
...
If I want to put the same value in all the variables, for example initialize them at 0, Is there any way to do this with a loop in which I only have to modify the index?
Something like this:
for(int i=0;i<=10;i++) {
number"i" = 0; }
Probably it is a silly question, but I can't find the solution. Thank you very much :)