I have to write a program that reads from a text file. It needs to read a value that is going to be a boolean value. When it reads from the file, "true", '1', and 't' all are valid ways. In a similar manner False can be represented by "false", '0' or 'f'.
When I read from the file, the c string is stored in a character array named oneString. My problem is how can I validate the '1', '0', 'f', and 't' since they are single characters. I have been trying to write a test program to get it working, so this is what I have.
I didn't read the file in this because I was just testing this in main before I tried doing it from the file. I was just setting up variables for the possible things it might read from the file.