mickey
17th July 2006, 21:21
hi I need put the col nu,ber inside f; this is working; is there a better way? (eg more fast) thanks
QString col = "1 1.5 0.5 1";
float f[4];
for (int i=1; i <= col.length(); i++) {
int p=0;
if (col.at(i) == ' ') {
QString c = QString::fromAscii(col,i);
f[p] = c.toFloat();
p++;
}
}
QString col = "1 1.5 0.5 1";
float f[4];
for (int i=1; i <= col.length(); i++) {
int p=0;
if (col.at(i) == ' ') {
QString c = QString::fromAscii(col,i);
f[p] = c.toFloat();
p++;
}
}