繁体   English   中英

tolower()函数在C99中不起作用

[英]tolower() Function not Working in C99

我正在使用哈佛大学的CS50设备,并尝试使字符小写。 我正在尝试使用tolower()函数,但是当我尝试使用它时,我得到消息消息implicit declaration of function 'tolower' is invalid in C99 任何人都想详细说明为什么我会收到此消息。 我已经包括了stdio.hstring.h

要在C99中使用tolower ,请使用#include <ctype.h>

它不是I / O函数,并且不对字符串进行操作(对字符进行操作),因此不在stdiostring

tolowerctype.h定义。 那是您应该包括的文件:

#include <ctype.h>

将解决您的问题。

它是在ctype.h中定义的,而不是在您提到的那些标头中定义的。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM