fork download
  1. Type_E _Get_Enum_Type(string sType)//convert string to enum
  2. {
  3. transform(sType.begin(), sType.end(), sType.begin(), tolower);
  4. if(sType == "input") {return INPUT;}
  5. else if(sType == "not") {return NOT;}
  6. else if(sType == "and") {return AND;}
  7. else if(sType == "nand") {return NAND;}
  8. else if(sType == "or") {return OR;}
  9. else if(sType == "nor") {return NOR;}
  10. else if(sType == "xor") {return XOR;}
  11. else if(sType == "xnor") {return XNOR;}
  12. else if(sType == "1'b0") {return LOW;}
  13. else if(sType == "1'b1") {return HIGH;}
  14. else {return NONE;}
  15. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp:1: error: ‘Type_E’ does not name a type
stdout
Standard output is empty