'A' || 'a' problem.

How we can check if a variable (example "choice") is 'A' or 'a', but without using ||?
If its a char, just use tolower() or toupper().
Uhm... How? Can you give an example, please?
1
2
3
4
//assuming 'a' is a char
if(toupper(a) == 'A')
//or
if(tolower(a) == 'a')
I gotta hear why you don't want to use ||.

So would this suffice:
 
if( !( a != 'a' && a != 'A' ) ) { }


:)
Thanks both! (Sorry for not saying that earlier...)
Topic archived. No new replies allowed.