title: Enum in structure
body: <p>My question is not really hard but I can't find a proper answer on the web to my problem.</p>
  
  <p>I define a <code>.h file</code> that contains a struct and declare some enum in it. I want to use that struct in another <code>.cpp file</code>. But the compilation return me error.</p>
  
  <p>Here's my code <code>variableStruct.h file</code> : </p>
  
  <pre><code>struct variableSupervision {
      std::string Donnees;
  
      enum TYPE
      {
        ENUM,
        INT,
        FLOAT,
        BOOL
      };
  
      enum UNITE
      {
        ETAT,
        A,
        V,
        TBC,
        DEGREEE
      };
  
      enum IN
      {
        SYSTEMMONITOR,
        MODEMANAGEMENT
      };
  
      enum OUT
      {
        SLIDECONTROL,
        MODEMANAGEMENT,
        HMICONTROL,
        MOTORCONTROL
      };
  
  
      enum GET {X};
  
      std::string Commentaire ;
  };
  </code></pre>
  
  <p>The error is : <code>redeclaration Of MODEMANAGEMENT</code>. I don't understand why, because they are in two different enum. Should I create different separate file for each enum ?</p>