Read double written with d character

  • Hi,

    I want to read a double value from a file. This value was generated by Fortran thus it uses the "d convention", 0.001 is written 1.d-3., when I tried to read it, it gives 1....

    Here the code
    In main:
    @double tempdouble;

    The function:
    @void read_real(QString name, double *value)
    ifstream file(qPrintable(name));
    double Value;
    file >> Value;



Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.