title: Using template parameter within a second template (STL container)
body: <p>I'm a noob experimenting with templates and design patterns and would like to create an iterator pattern using a template argument ITEM.  However, my private member var is a STL container that is itself a template, so how can I 'sync' the template argument of the STL container to that used by the class template?  </p>
  
  <p>Here is the actual class:</p>
  
  <pre><code>#include "StatusIteratorInterface.h"
  #include "StatusContainer.h"
  #include &lt;map&gt;
  
  template&lt;typename ITEM&gt; class StatusContainer;
  
  template &lt;typename ITEM&gt;
  class StatusIterator : public StatusIteratorInterface&lt;ITEM&gt; {
  
  public:
      StatusIterator( StatusContainer&lt;ITEM&gt;* container );
  
      ITEM* getFirst( void );
      ITEM* getNext( void );
      bool isDone( void );
      ITEM* getCurrent( void );
  
  private:
      StatusContainer&lt;ITEM&gt;* container_;
      ITEM* currentItem_;
      std::multimap&lt; std::pair&lt;std::string, uint32_t&gt;, ITEM &gt;::iterator conIter1_; //gives error
      std::multimap&lt; std::pair&lt;string, uint32_t&gt;, uint32_t&gt;::iterator conIter_;
  };
  </code></pre>
  
  <p>conIter_ is fine, but 'hard-codes' my template value.  including the line above it gives this compile error:</p>
  
  <pre><code>/Users/joe/Developer/Template_DesignPattern_Iterator/StatusIterator.h:33: error: expected ';' before 'conIter1_'
  </code></pre>
  
  <p>I have a main that compiles and runs this code fine, but obviously is only suitable for uint32_t types.  Pardon me if I've used incorrect terminology such as 'template argument' vice 'template parameter'.</p>