Tolower () Function does not work in C99

I am using a Harvard CS50 device and trying to make the character lowercase. I try to use the tolower() function, but when I try to use it, I get the message implicit declaration of function 'tolower' is invalid in C99 . Someone will think about why I get this message. I included stdio.h as well as string.h .

+4
source share
3 answers

To use tolower in C99, use #include <ctype.h>

This is not an I / O function, and it does not work with strings (it works with characters), so it is not in stdio or string .

+12
source

tolower defined in ctype.h . This is the file you should include:

 #include <ctype.h> 

will solve your problem.

+3
source

It is defined in ctype.h not in the headers you mentioned.

+1
source

Source: https://habr.com/ru/post/1436510/


All Articles