+ 1
Is it possible to use switch with enum?
I'd like to have user input select the enum value and then evaluate the integer portion of it with switch but am unsure of how.
3 Respostas
+ 1
Directly use user input names of enum u cant its like const variable names. U should do some conversion from string or use integer values.
https://code.sololearn.com/cqd9nHVizok7/?ref=app
0
of course if your question about Cpp? 😉
0
Ya, I'm an intermediate coder with cpp, so that's what I'm familiar with, but I've decided to learn cs