title: error C2819: type 'Robot::Animation' does not have an overloaded member 'operator ->'
body: <p>I cannot for the heck of it find why this is throwing an error!  Okay so I have a Struct that contains some objects.  I then create a pointer to that struct and set the items one by one.  By I keep getting an error.  Here's the code:</p>
  
  <p><strong>Robot.h:</strong></p>
  
  <pre><code>// Name and Animation info
  std::map&lt;std::string, Ogre::AnimationState*&gt; mAnims2;
  
  struct Animation {
      std::string name;   // The name of the animation state
      Ogre::AnimationState* mAnimState;   // The actual animation state
      bool FADE_IN;       // Fade the animation in
      bool FADE_OUT;      // Fade the animation out
  };
  </code></pre>
  
  <p><strong>Robot.cpp:</strong></p>
  
  <pre><code>    // Go through the set by using iterator
  while (animStateIter.hasMoreElements()) {
      // The Animation object we will construct
      Animation* mAnimation = new Animation();
      // Initial values for Fading In and Out
      mAnimation-&gt;FADE_IN = false;    
      mAnimation-&gt;FADE_OUT = false;   
      // Create the Animation object, using the next animation in the list
      mAnimation-&gt;mAnimState = animStateIter.getNext();
      // Set the animations name
      mAnimation-&gt;name = Animation-&gt;mAnimState-&gt;getAnimationName();
      // Make sure the animation is set to Loop
      mAnimation-&gt;mAnimState-&gt;setLoop( true );
      // Insert the Animation object into the list of Animations
      mAnims2.insert( std::make_pair( mAnimation-&gt;name, mAnimation) );
      /* DEBUG */
      output &lt;&lt; mAnimation-&gt;name &lt;&lt; std::endl;
  }
  </code></pre>
  
  <p><strong>The Error:</strong></p>
  
  <p><code>Error  1   error C2819: type 'Robot::Animation' does not have an overloaded member 'operator -&gt;'   c:\users\masry\school-work\fall-2010\cs-425\homework-4\gameengine_solution\robot.cpp    52</code></p>
  
  <p>Also if you noticed, I am trying to dynamically create Struct objects and insert them into a Map.  I call:</p>
  
  <pre><code>Animation* mAnimation = new Animation();
  </code></pre>
  
  <p>in a while loop, is this good OO design?  If not, what is a better way?  Thank you.</p>
  
  <p><strong>EDIT:</strong>
  So, thanks to Frédéric, it turned out that I was missing a letter.  but now I am getting an error saying:</p>
  
  <pre><code>Error   17  error C2784: 'std::basic_ostream&lt;char,_Traits&gt; &amp;std::operator &lt;&lt;(std::basic_ostream&lt;char,_Traits&gt; &amp;,unsigned char)' : could not deduce template argument for 'std::basic_ostream&lt;char,_Traits&gt; &amp;' from 'std::string'    c:\users\masry\school-work\fall-2010\cs-425\homework-4\gameengine_solution\robot.cpp    58
  </code></pre>