我收到一个错误,我不明白并找不到解决方案。缺少原型错误
的错误如下:
失踪原型isANumber
代码它指的是:
double prompt(char *promptString) {
printf("%s", promptString);
char *input = "";
scanf("%s", &*input);
printf("%s\n", &*input);
int check = isANumber(input);
if (check) {
return (double) *input;
} else {
return 0.00;
}
}
int isANumber(char *check) {
int result = 0; /* Current isdigit() return value */
do /* Check that each character of the...*/
result = isdigit(*check++); /* ...string is a digit and move on...*/
while (result && *check); /* ...until non-digit found or at EOS */
return result; /* Return result of last isdigit() call */
}
库包括:
#include <stdio.h>
#include <limits.h>
#include <ctype.h>
#include <stdlib.h>
#include <string.h>
任何帮助将是赞赏:)
感谢,瞬间固定:) – Graham