I have a function in my Class which takes a char* from std input. I'm supposed to return an enum type "VehicleType". The function is part of the Vehicle class. It's supposed to return the vehicle type based on index[0] of the char*. I'm confused as how to even start this or return the element of the enum. Thanks in advance for any help.

Here's the table for the enum.

sn[0]: 0 1 2 3 4 5 6
VehicleType: badSn vehicle car truck van tanker flatbed

static VehicleType SnDecode(const char* sn)

Start of by using a enum successfully without classes.

Then work up from there.