Hi guys im having a big issue with my program iv attached the pogram because iv recieved all sorts of stuff of what the problem could be. if you take a look at the source code of cal.c im calling the getUserInput function then calling another function called validate month to validate the input from the getUserInput function.. However its not validating any of the input correctly at all and im 100 % sure there's nothing wrong with my validation coding.. So when i type a month between 0 - 12 i still get an error saying that its an incorrect month when it shouldnt be.. 0 is valid because thats suppose to display all months.. Its sorta difficult to explain if someone could run the program and test the conditionals in the validation function you will see what i mean.. im going nuts someone plz solve it thnxs
Just find the following lines in cal.c in the function unsigned getMonth() Code: month = getUserInput(prompt); month = validateMonth(prompt,month ); and replace it with the following lines Code: month = getUserInput(prompt); valMonth = atoi(month); month = validateMonth(valMonth,prompt); This should solve your problem of prompt. Thanks Shabbir