Step by step

My diary

...

Search

breakinformation. Powered by Blogger.

2018년 9월 27일 목요일

enumeration switch


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#include <stdio.h>
 
enum LuxSkill {
    
    LightBinding = 1,
    PrismaticBarrier,
    LucentSigularity,
    FinalSpark
};
 
int main (void) {
    
    enum LuxSkill skill;
    
    skill = LightBinding;
    
    switch (skill) {
        
        case LightBinding:
            printf("LightBinding\n");
            break;
        case PrismaticBarrier:
            printf("PrismaticBarrier\n");
            break;
        case LucentSigularity:
            printf("LucentSigularity\n");
            break;
        case FinalSpark:
            printf("FinalSpark\n");
            break;
        default:
            break;    
    }
    
    return 0;
}
cs

0 개의 댓글:

댓글 쓰기