簡體   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