Go back to Richel Bilderbeek's homepage.

Go back to Richel Bilderbeek's C++ page.

 

 

 

 

 

(C++) std::atoi

 

 

std::atoi is a function to convert a character string to an integer.

 

 

 

 

 

Example: StrToInt

 


#include <string>

//From http://www.richelbilderbeek.nl/CppStrToInt.htm
int StrToInt(const std::string& s)
{
  return std::atoi(s.c_str());
}

 

 

 

 

 

Go back to Richel Bilderbeek's C++ page.

Go back to Richel Bilderbeek's homepage.

 

Valid XHTML 1.0 Strict