The flags are just bit patterns, eg 00000001 and 00000010, so you can use OR to combine them and AND to test for them. It's a fairly common technique for setting flag values. In decimal the flags will have values 1,2,4,8,16... so you can use a single int to hold a number of them.