I posted this question earlier and I am still completely stuck. I know it is alot of code to look at but the problem should be simple I just can't figuare it out for the life of me.
I need to test that the user input the date in the proper format dd/mm/yyyy. how do I test the string upon enter to ensure proper formatting? the char's are all converted to int's and the pointers are there but how can I test the string? I believe it needs to be done in the String_To_MDY()....
So you need to check that the first two input characters are numbers, and that they're something between 01 and 31. How would you do that by hand? You say you can already turn the characters into int, so:
Look at first int.
If it's not 0 or 1 or 2 or 3, then this is bad input.
Look at second int.
If it's not 0 or 1 or 2 or 4 or 5 or 6 or 7 or 8 or 9, then this is bad input.
If the first number was 3, and the second number is not 0 or 1, then this is bad input.
Look at third input character. If it's not '/', then this is bad input.
Look at third int (first part of month).
If it's not 0 or 1, then this is bad input.
Look at fourth int.
If it's not 0 or 1 or 2 or 4 or 5 or 6 or 7 or 8 or 9, then this is bad input.
If the third numbers was 1, and the second number is not 0 or 1 or 2, then this is bad input.