title: how to define an enumeration inside a class and use it from the outside
body: <p>Just because I don't know exactly where to look this up in my c++ book, or on google. How do I actually define some enumerations(in this case <code>{ left=1, right=2, top=3, bottom=4 }</code>) inside a class. I want to be able to pass this enumeration as a parameter to member functions instead of an integer, therefore using the enumeration externally...</p>
  
  <p><strong>Is there a way I can do this, or is there a better way I which I can make the enumeration specific to that class only?</strong></p>
  
  <p>Here's the code that's not working, saying <code>enum mySprite::&lt;unamed&gt; myySprite::side member mySprite "mySprite::side" is not a type name</code> for some reason:</p>
  
  <pre><code>class mySprite : public sf::Sprite
  {
  public:
      enum{left=1, right=2, top=3, bottom=4} side;
  
      float GetSide(side aSide){
          switch(aSide){
              // do stuff
          }
      };
  };
  </code></pre>