Can you use a switch statement with a string C++?

There are a number of requirements to make a function or an expression constexpr, but we can still use that to make switch/case work on strings (or const char *). The switch/case statement itself will still require an integral operand, so we must transform a string into an integral value.

Sizin İçin Seçtik  Which state is 5G tested in India?

Leave a Reply

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