1. An integer cannot have characters. What do you want ? You want to find if a certain digit is in a certain number ?
Code:
```// 1 means found
// -1 means error
int search_digit(int num, int digit)
{
if(num == 0 && digit == 0) return 1;
if(digit >= 10 || digit < 0) return -1;
while(num > 0)
{
if((num % 10) == digit) return 1;
else num /= 10;
}
return 0;
}```

2. You don't even need a switch for that. It can be accomplished in a simple pair of if statements:

Code:
```	if ( numberhold >= 'A' && numberhold <= 'Z' )
std::cout<<"uppercase character is "<<static_cast<char>(numberhold)<<std::endl;
else if ( numberhold >= 'a' && numberhold <= 'z' )
std::cout<<"lowercase character is "<<static_cast<char>(numberhold)<<std::endl;```

3. Originally Posted by Desolation
An integer cannot have characters. What do you want ? You want to find if a certain digit is in a certain number ?
Code:
```int search_digit(int num, int digit)
{
if(digit >= 10 || digit < 0) return -1;
while(num > 0)
{
if((num % 10) == digit) return 1;
else num /= 10;
}
return 0;
}```
integers can be represented as characters, by interpreting them with their equivelant ascii value; http://www.lookuptables.com/

4. No, sorry I explained it wrong. I want to see if the user inputs any thing other than an integer it says an error message. Hold on I have an idea.

Edit:Nope I tried this but it gives a fatal error every time and crashes the program.

Code:
```       if(isdigit(numberhold)!=1)
{
cout<<"Error, Please Input A Whole Number Between 1 and 5";
}```

5. I know that. However, integers cannot contain characters. That is my point.

6. Code:
```std::string tmp;
std::cin >> tmp;

for(int i = 0; i < tmp.size(); i++)
{
if(!isnum(tmp[i]))
{
// not a number, do something
}
}```

7. Implicit Declaration of function 'int isnum(...)'

8. Oh well, can't find what header has it.
Code:
```inline bool isnum(char c)
{
return (c >= 48 || <= 57);
}```

9. Hmm...well now if I input anything it just exits the program.

10. >Oh well, can't find what header has it.
That's because isnum isn't a standard function. You're thinking of isdigit from <cctype>. An isnum function would be particularly awkward because it implies that any legal character from any numeric type would return true. That includes non-digit characters that are valid in certain numeric representations such as floating-point and hexadecimal.

>return (c >= 48 || <= 57);
That's kind of broken. You forgot to put c in the second half of the expression. The logic is also faulty because if c is greater than 48, regardless of how much greater, the test will return true. Something like this would be better:
Code:
```inline bool isnum(char c)
{
return (c >= 48 && c <= 57);
}```
You also have two portability issues. The first is that isnum is a reserved name (specifically, any name that begins with "is" and is followed by at least one lower case letter). The second issue is that you assume the values of the digits in your character set. You also assume that they're consecutive, which is okay in this case, but you can't make the same assumption for the rest of the character set. The good news is that you can write this function portably:
Code:
```bool is_num ( char ch )
{
return '0' <= ch && ch <= '9';
}```
Then again, isdigit gives you the same solution without having to worry about locales either.

11. Huh, I think I had a brain fart there and completely changed isdigit to isnum =/ I think I was pretty tired because that function now looks quite stupid to me with the binary OR and the missing 'c' =/ Oh well, thanks for pointing out =]

12. case 'a': blabla?