fork download
  1. #include<cstdlib>
  2.  
  3. namespace myns {
  4. namespace command{
  5. enum Command{
  6. exit ='c'
  7. };
  8. } // namespace command
  9.  
  10. void some(const char *s){
  11. using namespace command;
  12. switch(s[0]){
  13. case exit: // 関数exit(int)と衝突する
  14. std::exit(0);
  15. }
  16. }
  17. } // namespace myns
  18.  
  19. int main()
  20. {
  21. using namespace myns;
  22.  
  23. char s[16];
  24. some(s);
  25. }
  26.  
Success #stdin #stdout 0s 2848KB
stdin
Standard input is empty
stdout
Standard output is empty