For example:
enum ABC
{
apple = 0xe,
banana = 0xd,
orange,
pineapple
}
Can orange automatically get the value of 0xc and pineapple 0xb?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
No, the values can only automatically increment. If you want the values to go the other way then you can reverse the order of the names.