Whats wrong with my switch function?

I've been stuck on this for too long, I'm the issue has to be small.
This is my code so far:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
switch(num)
{
    case '1' || '2' || '3' || '4' || '5' || '6' || '7' || '8' || '9' || '0':
    num=num;
    break;
    case '-':
    num = '-';
    break;

    case 'A'|| 'a'||'B' ||'b'||'C'|| 'c':
    num='2';
    break;

    case 'D' || 'd' || 'E' || 'e' || 'F' || 'f':
    num='3';
    break;
    case 'G' || 'g' || 'H' || 'h'||'I' || 'i':
    num='4';


I can't get the compiler to read line 10 and anything below it
I do not think cases work like you think they work.

Try

1
2
3
4
5
6
case '1':
case '2':
...
case '0':
num=num;
break;
Topic archived. No new replies allowed.