d�clarer un string a partir d'une variable
Bonjour,
Je d�sire d�clarer une suite de variables, dont le dernier caract�re du nom est incr�ment�.
Par exemple :
Code:
1 2 3 4
| ucstring variable1;
ucstring variable2;
ucstring variable3;
... |
Pour cela je concat�ne deux string :
Code:
1 2 3 4 5 6 7 8 9 10
|
int NombreDeVariable = 5;
int i = 0;
while (i<NombreDeVariable)
{
ucstring j.fromUtf8(i); // Converti int en ucstring
ucstring test = "variable";
ucstring variable = test += j; // Concatenation
i++;} |
variable prend donc les valeurs : "variable1, variable2,...".
Le probl�me est que je ne sais pas comment d�clarer une variable qui � pour nom (et non pas pour valeur) "variable1, variable2,...".