Enum 0 must const?

 
enum ENUM_SG_PROFITSTATUS
  {   
      
      a =1,    
      b=2,            
      c=3,                   
      d=4,                   
      e=5, 
  };


void  testbbb()

{

   ENUM_SG_PROFITSTATUS pf;
   
   ZeroMemory(pf);
   switch(pf)
     {
     
      case 0:
         
         break;
      default:
        break;
     }

}


Run Code,then Error:

'0' - cannot convert enum OOPTest.mq4 39 12

 
ah2005:
    
      case 0:

'0' - cannot convert enum OOPTest.mq4 39 12

  1. Please edit your (original) post and use the CODE button (Alt-S)! (For large amounts of code, attach it.)
              General rules and best pratices of the Forum. - General - MQL5 programming forum (2019.05.06)
              Messages Editor

  2. The enumeration only has values a,b,c,d, and e. Use one of those.