In c++, is it possible to pass a variable to a function to call an enum and return a value from the enum? If this is a common question, I apologize, I'm new to c++ and might be using the wrong key words when I search.
The compile error I receive is
Compilation error: cannot convert 'String' to 'getValue' ininitialization
enum getValue { monday = 20, tuesday = 30, wednesday = 40, thursday = 50, friday = 60, saturday = 70, sunday = 80, everyday = 90 };String settingValue(String settingName){ getValue value = settingName; // getValue value = monday; <-- this works, although I'd like to call it with settingName instead of the hard coded text return value;}