How to read the Exponential entry of a number from a file (more desirable) And in what form should it be recorded in a file?

  • What is an "exponential number" ? Maybe a floating point number? So for this there is a pack of normal functions in the standard library. - VTT
  • Exponential notation, a bit wrong with the wording - Max Krugovykh
  • Ok, what is the "Exponential notation" ? - VTT
  • 2
    And what vac strtof or anlogs do not suit? - VTT
  • one
    double in this form is read with iostream without problems - yrHeTaTeJlb

1 answer 1

Just take and read double with fstream

 #include <fstream> //... std::fstream fs ("test.txt"); double d; fs >> d; 

Example cin but no differences