fork(1) download
  1. #include<iostream>
  2. using namespace std;
  3.  
  4. class Inventory {
  5. public:
  6. enum class Fruit { APPLE, BANANA, GRAPE, ORANGE };
  7. enum class Paint { RED, BLUE, GREEN, ORANGE };
  8. };
  9.  
  10. int main() {
  11. auto leFruit = Inventory::Fruit::ORANGE;
  12. if(leFruit == Inventory::Fruit::ORANGE) {
  13. cout << "Behold this, for this is an orange." << endl;
  14. }
  15. }
Success #stdin #stdout 0s 2828KB
stdin
Standard input is empty
stdout
Behold this, for this is an orange.