C++ Error: “Expression must have integral or enum type” [duplicate]

The error is clear. You can only use integral types (integer, enum, char etc. which are convertible to integral value), or any expression that evaluates to an integral type in switch statement.

Leave a Comment