string phone_nb = "173";
char just_one_char = phone_nb[1];
int i_just_one_char = stoi(just_one_char);
I get these errors:
no matching function for call to 'stoi'
int i_just_one_char = stoi(just_one_char);
note: candidate function not viable: no known conversion from 'char' to 'const std::__1::string' (aka 'const basic_string<char, char_traits<char>, allocator<char> >') for 1st argument
_LIBCPP_FUNC_VIS int stoi (const string& __str, size_t* __idx = 0, int __base = 10);
note: candidate function not viable: no known conversion from 'char' to 'const std::__1::wstring' (aka 'const basic_string<wchar_t, char_traits<wchar_t>, allocator<wchar_t> >') for 1st argument
_LIBCPP_FUNC_VIS int stoi (const wstring& __str, size_t* __idx = 0, int __base = 10);