(C++) std::atof

January 10, 2018 · View on GitHub

 

 

 

 

 

(C++) std::atof

 

std::atof is a function to convert a character string to a double.

 

 

 

 

 

Example: StrToDouble

 


#include <string> //From http://www.richelbilderbeek.nl/CppStrToDouble.htm double StrToDouble(const std::string& s) {   return std::atof(s.c_str()); }

 

 

 

 

 

 

Contents

  1. 1Example: StrToDouble
  2. 2//From http://www.richelbilderbeek.nl/CppStrToDouble.htm double StrToDouble(const std::string&#x26; s) { return std::atof(s.c_str()); }"> #include &#x3C;string> //From http://www.richelbilderbeek.nl/CppStrToDouble.htm double StrToDouble(const std::string&#x26; s) { return std::atof(s.c_str()); }