Loop through variable names
I have variable names like user1, user2, user3,... along with other variable names using numbers in the actual name. I was wondering if there was a way for me to use a for loop to reference those variable names using the for loop counter as an index like...
for (int i=0; i < 10; i++) {
user[i] = "some data";
}
Obviously, the above doesn't work but is there any way to force an evaluation of the value of i before evaluating user, if that makes any sense? Any help is appreciated.
Edited by: darkmatter on May 24, 2012 7:18 AM