I've got a routine which gets numbers in the exponent format(e.g. 2,5E-02 or 4E+06) as a QString. When I print the values I always only get integers and when they are smaller then 1 I always get 0. Does anyone know what I am doing wrong here? (with the cout line I only wanted to test whether the QString::number() is ruining it for me)
here is a code snippet:
QStringList valPair;
value = atof(valPair[0].replace(",",".").toAscii());
value1 =atof(valPair[1].replace(",",".").toAscii());
strValue = "[" + QString::number(value) + ", " + QString::number(value1) + "]";
//cout<<value<<" "<<value1;
I'd appreciate any help!
EDIT: It was a Problem with variable declaration...
double value, value1;