【发布时间】:2021-07-25 02:44:30
【问题描述】:
#include <stdio.h>
#include <cs50.h>
#include <ctype.h>
#include <math.h>
// Prototype
string Get_text(void);
char isupper(ch);
int main(void)
{
string text = Get_text();
printf("%s\n", text );
}
// Prompt the user for text
string Get_text(void)
{
string n;
do {
n = get_string("Text: ");
}
while (n >= 0);
// Letters, Words, & Sentences
char ch = 'A';
}
我在运行代码时遇到错误。它指出我在第 9 行实现了 isupper 函数来检查字母是否大写。我什至在 char 括号之前在 isupper 上添加了一个额外的括号,但仍然存在错误。 PS我还没有完成代码。我正在审查 isupper 函数的工作原理。
【问题讨论】:
-
这段代码不包含
isupper的实现。 -
@ScottHunter:也不应该。
-
"...第 9 行,我实现了 isupper 函数..."