Best practice is to always include the header file where something is defined. If it works without defining, that means that cctype was included in some other header file that you DID include. You can't rely on that as that header file could change in the future.
Thank you for the tutorial. I tried same and it works fine. Only issue is, it doesn't work for all UTF-8 characters(Latin) & i am kind off stuck with it.
You use it whenever you need to explicitly cast something. If you need it, use it. If you don't, don't. In other words, it depends. 😎 Even then, you don't necessarily need static_cast with toupper or tolower. For example, char c = toupper('a'); cout
Thank you man! You did what my teacher couldn't, you helped me a lot.
Glad I could help!
Thank you a bunch!!! I really needed to see the for loop used with a case conversion. Need it for homework. You're an 😇. Subbed fo' life!!
Thank you for the kind words!
Thank you! Your video helped me a lot! I was kinda stuck with it!
You're welcome! Glad it helped!
My program runs fine without the #include . Is that just a windows thing?
Best practice is to always include the header file where something is defined. If it works without defining, that means that cctype was included in some other header file that you DID include. You can't rely on that as that header file could change in the future.
Thank you! Helped me alot.
Glad it helped!
Thank you your video help me to make project !
You're welcome. Glad it worked out!
Out of all the character functions, does static_cast only apply to toupper and tolower?
Use it whenever you need to convert an int to a char.
THX BRO I LOVE U!
Glad I could help (and I love me too)
Thank you so much!
You're welcome!
Hi, What platform are you using to code?
hi ya,
It's just Visual Studio Community on Windows 10.
Thank you for the tutorial. I tried same and it works fine. Only issue is, it doesn't work for all UTF-8 characters(Latin) & i am kind off stuck with it.
I would look in the library for something that does support other character sets. I remember reading about that and may do a future video for that.
thank you, I was making the mistake of the ASCII code sign returned so when I put in a letter, it gave me back a number, LOL
You're welcome!!
Out of all the character functions, does static_cast only apply to toupper and tolower?
You use it whenever you need to explicitly cast something. If you need it, use it. If you don't, don't.
In other words, it depends. 😎
Even then, you don't necessarily need static_cast with toupper or tolower.
For example,
char c = toupper('a');
cout