fork(3) download
  1. #include <iostream>
  2. #include <sstream>
  3. #include <iomanip>
  4. using namespace std;
  5.  
  6. int main() {
  7. const std::string str = "44.23331002";
  8. double x;
  9. stringstream ss;
  10. ss << str;
  11. ss >> x;
  12. cout << str << " = " << std::setprecision(10) << x << endl;
  13. }
Success #stdin #stdout 0s 3456KB
stdin
Standard input is empty
stdout
44.23331002 = 44.23331002