title: C++ pass enum as parameter
body: <p>If I have a simple class like this one for a card:</p>
  
  <pre><code>class Card {
          public:
              enum Suit { CLUBS, DIAMONDS, HEARTS, SPADES };
              Card(Suit suit);
      };
  </code></pre>
  
  <p>and I then want to create an instance of a card in another file how do I pass the enum?</p>
  
  <pre><code>#include "Card.h"
  using namespace std;
  int main () {
      Suit suit = Card.CLUBS;
      Card card(suit);
      return 0;
  }
  </code></pre>
  
  <p>error: 'Suit' was not declared in this scope</p>
  
  <p>I know this works:</p>
  
  <pre><code>#include "Card.h"
  using namespace std;
  int main () {
      Card card(Card.CLUBS);
      return 0;
  }
  </code></pre>
  
  <p>but how do I create a variable of type Suit in another file?</p>