title: Getting an "enum is not a class or namespace" error - C++
body: <p>I declared an enum (called Direction) in a header file:</p>
  
  <pre><code>enum Direction {LEFT, RIGHT};
  </code></pre>
  
  <p>Then, i have a constructor that takes a Direction value and set it for another Direction variable (stringDirection).</p>
  
  <pre><code>bool InformationWidget::move(Direction direction){
      stringDirection=direction;
  
  return true;
  }
  </code></pre>
  
  <p>And finally, i have an if statement that checks the value of it:</p>
  
  <pre><code>if (stringDirection == Direction::RIGHT)
  </code></pre>
  
  <p>This is where i'm getting the error, at that if statement.. any ideas?
  I tried looking around at previous threads but didn't find anything useful.</p>
  
  <p>Thanks!</p>
  
  <p>EDIT:</p>
  
  <p>Here are my files:</p>
  
  <p>Widget.h</p>
  
  <pre><code>enum class Direction {LEFT, RIGHT};
  
  class Widget {
  public:
       virtual bool...
       ...
  };
  </code></pre>
  
  <p>information.h</p>
  
  <pre><code>class InformationWidget: public Widget {
  public:
      ...
      Direction stringDirection;
      ...
  };
  </code></pre>
  
  <p>information.cpp</p>
  
  <pre><code>void InformationWidget::show(){
  
  ...
  
  if (stringDirection == LEFT) {
  ... }
  }
  </code></pre>