Hello guys i´m new to programming and i ran into a problem. I have a String and I use the lenght of the String to create variables according to the lenght of the string. I want to use a string("usagetxt_whl_str") as the name of my integer. Every time the loop runs it should create a new variable with a diffrent name. for example: 1_var, 2_var and so on
QString usagetxt = "example"
int usagetxt_len = usagetxt.length();
int usagetxt_whl = 0;
QString usagetxt_whl_str = QString::number(usagetxt_whl);
while (usagetxt_whl != usagetxt_len){
usagetxt_whl = usagetxt_whl + 1;
**here im trying to create my var**int usagetxt_whl_str + "_var" = 0;* }
How can I get this to work? Is it even possible?