When I create variable I just put the a name for it, but can I create the name of the variable like this:
int var+1= 1;
So basically that should be:
int var1=1;
I know I can’t use the + sign to do that but is there way to do it?
EDIT
int g=1;
string hello+g = "sdljfsdl"; // So hello+g will be hello1
So it is like mixing variable value by another variable value to get new variable name.
You can do this with macros, but you really shouldn’t need dynamic variable names. It sounds like this sort of problem can be solved with an array: