- Oct 21, 2003
- 99
- 0
- 0
Im trying to have a variable name, depending on the value of a counter. Something like this:
int i;
for (i=1; i<=10; i++)
{
int vari = i;
}
This way, at the end of the loop, i would have the following variables:
var1 = 1
var2 = 2
var3 = 3
...
var10 = 10
How would I do this???
int i;
for (i=1; i<=10; i++)
{
int vari = i;
}
This way, at the end of the loop, i would have the following variables:
var1 = 1
var2 = 2
var3 = 3
...
var10 = 10
How would I do this???