Skip to content

Latest commit

 

History

History
53 lines (29 loc) · 840 Bytes

CppStdAtoi.md

File metadata and controls

53 lines (29 loc) · 840 Bytes

 

 

 

 

 

 

 

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()); }