fork download
#include 
#include 
#include 

enum COLLISION {
    C_ON            = 1,// 00001
    C_EX            = 2,// 00010
    BOX             = 4,// 00100
    POLYGON         = 8,// 01000
    OCTREE          = 16// 10000
};
int main()
{  
    int c = C_ON | BOX;
    
    if(c & C_ON) std::cout << "c_on" << std::endl;
    else std::cout << "c_off" << std::endl;
    if(c & C_EX) std::cout << "c_ex" << std::endl;
    if(c & BOX) std::cout << "box" << std::endl;
    if(c & POLYGON) std::cout << "polygon" << std::endl;
    if(c & OCTREE) std::cout << "octree" << std::endl;
}
Success #stdin #stdout 0s 2896KB
stdin
Standard input is empty
stdout
c_on
box