fork download
  1. #include <iostream>
  2. #include <vector>
  3. #include <string>
  4.  
  5. struct VarInfo
  6. {
  7. static std::vector<std::string> m_datatypeName;
  8. };
  9.  
  10. std::vector<std::string> VarInfo::m_datatypeName{"",
  11. "STRING",
  12. "TIME",
  13. "MACADDRESS",
  14. "IPADDRESS",
  15. "STRINGSET",
  16. "SET",
  17. "UINT32",
  18. "INT32",
  19. "BOOL"};
  20. int main()
  21. {
  22. std::cout << VarInfo::m_datatypeName[0]
  23. << ", "
  24. << VarInfo::m_datatypeName[9]
  25. << "\n";
  26.  
  27. return 0;
  28. }
  29.  
Success #stdin #stdout 0s 3020KB
stdin
Standard input is empty
stdout
, BOOL