C语言if (islower(ch))那行提示error C2059语法错误“)”,error C2146缺少“;”在标识符CH的前面

2025-04-14 02:26:30
推荐回答(2个)
回答1:

if(islower(ch)) // 这里 if 后面的左括号“(”是中文字符
ch = toupper(ch);
要改成: if(islower(ch)) ch = toupper(ch);

回答2:

你的小括号(是全角括号,不是半角括号。