I'm trying to use the functions isDigit()
I have the correct include statement, #include <ctype.h>
however, I seem to be getting a warning when I compile,
warning: implicit declaration of function 'isDigit' is invalid in C99 [-Wimplicit-function-declaration]
The line that compiles the warning is if(isDigit(atoi(inputLine)) {
can anyone give me feedback as to what I am missing here? Thanks.
The name of the function is isdigit()
, not isDigit()
. C is case-sensitive.
在你的程序中包含这个头文件: #include<ctype.h>
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.