C++ isprint and iscntrl

JC724

Weaksauce
Joined
Jan 20, 2016
Messages
118
I really don't understand how isprint and iscntrl works?

I was reading up online and it still didn't make a lot of sense to me?

Can someone break down how both of those functions work?
 
What's to not understand?

IsPrint - takes in a character and returns 0 if not printable, and any other number if true.
http://www.cplusplus.com/reference/cctype/isprint/

iscntrl is the same input/oputput but this time checks if control character.
http://www.cplusplus.com/reference/cctype/iscntrl/

Remember - there are ascii characters that can be printed to the screen and others that are not. Both of those links show the hexcode it checks if the characater between, and you cna follow along with an ascii table.

example: http://www.bluesock.org/~willg/dev/ascii.html
 
Back
Top