I use code:
for(int i = 1; i < n; i++){ cout<<stoi(s1[i]) + stoi(s1[i-1]); //ошибка error: no matching function for call to 'stoi(__gnu_cxx::__alloc_traits<std::allocator<char> >::value_type&)'| } What is the problem and how to fix it? a string of numbers only.
s1? - ߊߚߤߘatoifunction is to translate - joystickatoifunction for twenty years now is not intended for practical use either in C or C ++, It exists only for backward compatibility. Forget aboutatoi. - AnT