I have an enum in my code that is the following: enum Status {In-Active, Active};. A status object is passed to a Person object as a parameter, so I wa
enum Status {In-Active, Active};
Person
You can't read enum values directly, you'll need a std::map that maps user input to an enum value.
enum
std::map
std::map m; m["In-Active"] = In-Active; m["Active"] = Active; std::string sstatus; cin >> sstatus; Status status = m[sstatus];