firix, you should know by now that there's no way we're going to give you a full solution. Moschops did give you a solid quarter of it, though, if I understood the problem correctly. :/
EDIT: Well... closer to 1/5 because of a teeny-tiny gigantic deliberate flaw.
firix, honestly I have gone through your posts and most of them ask for a solution with no attempts at a solution yourself. I am surprised Mochops was kind enough to even give you something.
There's an error in the code, but it's easily fixed. Sod it, I'll just give you the function.
1 2 3 4
bool isalpha(char a)
{
return ((a >= 'A') && (a <= 'z'));
}
The function accepts a char, and returns true is the char is an alphabetical letter, and false if it is not.
That's your lot, though. You can use this as a template to do all the rest. Your original functions were passing in integers. Why integers? The instructions make it clear you should be judging characters.
firix, honestly I have gone through your posts and most of them ask for a solution with no attempts at a solution yourself. I am surprised Mochops was kind enough to even give you something.
please.
Do not get me wrong.
I could not understand the subject.
I have read here, but there is nothing to understand.
Define a set of overloaded versions for isalpha(), isdigit(), so that these functions work correctly for char ,unsigned char ,and signed char
This means make six functions. Three of them are called isalpha, three of them are called isdigit.
The isalpha functions are to take in a char or an unsigned char or a signed char, and should return true if the input is a letter, and return false if the input is not a letter.
this example in Bjarne Sttorutrup`s C++ programming Language book
Define a set of overloaded versions for i s a l p h a (), i s d i g i t (), etc., so that these functions
work correctly for c h a r , u n s i g n e d c h a r , and s i g n e d c h a r