Can you switch on an enum C++?

In C++, enums are permitted to have values other than the explicit enumerators. … After execution falls through the switch statement, it reaches the end of the function without returning a value, which is undefined behavior for a function with a non-void return type.

Sizin İçin Seçtik  How do I convert an enum to a string in C++?

Leave a Reply

Your email address will not be published. Required fields are marked *