typedef enum FoodType{
fruit = 0,
bread,
candy,
numFoodTypes
}FoodType;
Keep in mind that this only works for contigues values, meaning, when fruit = 0, bread = 1, candy = 2.
typedef enum FoodType{
fruit = 0,
bread,
candy,
numFoodTypes
}FoodType;
Keep in mind that this only works for contigues values, meaning, when fruit = 0, bread = 1, candy = 2.