Well I've been curious for a while as to where I can find the file(s) which show the actual implementation of library functions such as atoi(const char *str). I found the stdlib.h header file, but all that it contained was external declarations of all its functions:
Then, using a debugger, I found that the atoi function actually led to another file, atoi.chf, which only used another library function, strtol(const char *str, char **endptr, int base), to make the conversion. The debugger, however, would not step into that function, so I could not find its source.Code:... extern double complex atoc(const char *); extern double atof(const char *); extern int atoi(const char *); extern long int atol(const char *); ...
Does anyone know if/where I can find the inner workings of these functions?
Note: I'm using a C/C++ interpreter, Ch, on Windows 7. All of the files I found are within the C:\Ch directory.