fork(1) download
  1. #include <iostream>
  2. #include <map>
  3. #include <string>
  4.  
  5. std::map<std::string, std::string> Error_A_List = {
  6. {"AA01", "Error AA01 Description"},
  7. {"AA02", "Error AA02 Description"},
  8. /* about 100 more! */
  9. {"BA01", "Error BA01 Description"},
  10. {"BA02", "Error BA02 Description"},
  11. /* more of course */
  12. {"ಠ_ಠ", "Error ಠ_ಠ ¯\\_(ツ)_/¯"},
  13. };
  14.  
  15. int main()
  16. {
  17. switch('ಠ')
  18. {
  19. case 'ಠ': for(auto const &value : Error_A_List)
  20. {
  21. std::cout << value.first << ": " << value.second << std::endl;
  22. }
  23. break;
  24. }
  25. }
  26.  
Success #stdin #stdout 0s 3416KB
stdin
Standard input is empty
stdout
AA01: Error AA01 Description
AA02: Error AA02 Description
BA01: Error BA01 Description
BA02: Error BA02 Description
ಠ_ಠ: Error ಠ_ಠ ¯\_(ツ)_/¯