I am adapting the maze generator algorithm written in C # to C ++.
I have found a new theme for me: Flags I know how to implement enumerators in c ++, it's practically the same, but I do not understand how to implement the flags.
In concrete this is the flag:
[Flags]
public enum CellState
{
Top = 1,
Right = 2,
Bottom = 4,
Left = 8,
Visited = 128,
Initial = Top | Right | Bottom | Left,
}
I have done the enumerator:
public enum CellState {
Top = 1,
Right = 2,
Bottom = 4,
Left = 8,
Visited = 128,
};
How should I implement the flags in c ++?