gpt4 book ai didi

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

转载 作者:太空狗 更新时间:2023-10-29 17:05:26 24 4
gpt4 key购买 nike

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

最佳答案

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

它不是一个 I/O 函数,它不对字符串进行操作(它对字符进行操作),所以它不在 stdio 中。或 string .

关于c - tolower() 函数在 C99 中不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12613537/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com