Top "Atoi" questions

atoi() is the C runtime library function for converting the ASCII representation of a number to an integer.

Why atoi function can't convert const char * to int?

Why does in this code the atoi() function does not work properly and why does the compiler give this error: …

c++ atoi
Converting 'integer strings' to integer array

I'm trying to pass in an array of integers into my program. Is there a better way to convert it …

c arrays atoi
atoi function in C not working properly (when exceeding a certain value)

Might someone explain why the atoi function doesn't work for nmubers with more than 9 digits? For example: When I enter: 123456789, …

c atoi
getting numbers from stdin to an array in C

I'm trying to get numbers from stdin to an array. the first number in stdin is the number of elements …

arrays getchar atoi
C character values arithmetic

I have been reading from the book "The C Programming Language" learning C, and I stumbled upon the arithmetic s[…

c char ascii expression atoi
How to parse an integer in a glib string (gchar *)?

I have a string which contains (the digits of) an integer value, and I want to obtain this value as …

c string glib atoi
Safely convert std::string_view to int (like stoi or atoi)

Is there a safe standard way to convert std::string_view to int? Since C++11 std::string lets us use …

c++ string c++17 atoi string-view