I have a variable that changes during operation (this is variable f). f = 0;
After I try to create names for arrays (example f = 3 means three arrays will be created with the names "Array1", "Array2", "Array3")
But I can not find the built-in function. that qt would create an array (CreateFile, CreateArray would not work)
for (int i = 1; i<f;i++) { QString st = "Array"+ i; CreateFile(st,int); CreateArray(st, int); } // --------------------------------------------
I tried as suggested here
QMap <QString, QVector<int>> map; int t_ter = 1; for (int i = 0; i<f;i++) { QString st = "Array"+ i; map[st] = t_ter; t_ter= t_ter+1; qDebug() << "map[st]" << map[st]; } but on line
map[st] = t_ter; Swears says error C2679. What have I done wrong ???