my problem goes like this: Let's suppose i got 3 variables (i = 1, j = 2, k =3) I want to do this: "a = 0.ijk" so a == 0.123 But those variables are under multiple for's so i'm saving their value on array..
I tried using sstream to convert them from string to int (123) then i would divide it by 1000 to get 0.123 but it ain't working...
float arrayValores[ maxValores ];
ostringstream arrayOss[ maxValores ];
...
arrayOss[indice] << i << j << k;
istringstream iss(arrayOss[indice].str());
iss >> arrayValores[indice];
arrayValores[indice] = ((arrayValores[indice])/1000)*(pow(10,z)) ;
cout << arrayValores[indice] << " ";
indice++;
Can someone aid me?