So I can type
int a1 = 1;
int b1 = 1;
and so on...
Is it possible to have a loop that would create as many ints (or any other type) with custom labels?
Something like...
int x = 0;
string str;
while ( x < y)
{
str = function_that_appends_x's_value_to_letter(x);
int "str" = 0; //this is my main question, I know this wouldn't compile.
x++;
}
I feel like the answer is staring me in the face using dynamic arrays, pointers, or something OR there would never be a real use for such a thing. I'm trying to make a puzzle of sorts, and having this functionality would make the code more "fun" to read.
int a1 = 1;
int b1 = 1;
and so on...
Is it possible to have a loop that would create as many ints (or any other type) with custom labels?
Something like...
int x = 0;
string str;
while ( x < y)
{
str = function_that_appends_x's_value_to_letter(x);
int "str" = 0; //this is my main question, I know this wouldn't compile.
x++;
}
I feel like the answer is staring me in the face using dynamic arrays, pointers, or something OR there would never be a real use for such a thing. I'm trying to make a puzzle of sorts, and having this functionality would make the code more "fun" to read.