<cctype> (ctype.h) library?

Status
Not open for further replies.

HopWorks

Active member
I want to use the <cctype> (ctype.h) library and including it didn't work. I tried to add it but nothing happens after I select ctype.h. I finally located it in several places, even in the include folder of my arduino folder in my documents.

What am I missing here? Is it possible to use this library with the teensy 3.1? I want to use isDigit which is part of that library to validate a string as numeric.

Thank you for your time!
 
I had a second thought, since a file search turned up so many ctype.h files on my windows machine. Is there anything I need to change to use this library? Should I build a library myself?
 
isdigit() takes an ASCII 8 bit char and as a macro, could be
Code:
#define isdigit(c) ( ( (c >= '0') && (c <= '9') )  ? : 1 : 0 )

Where c is a type char.

This is probably similar to that in ctype.h. Most of the sources for this are just macros and are on the 'net.
 
Last edited:
What you replied with is a little beyond me. I apologize for my ignorance. I was looking for how I can include the ctype library without throwing an error. I guess I need to read up on using the libraries that are spread out in the install.
 
Status
Not open for further replies.
Back
Top