title: Trouble using enum in a set c++
body: <p>I put all my enums into a set.  I am trying to iterate through the set and use a switch statement to give variables values(haven't done that yet).  I am having trouble setting up an iterator to put in the switch statement that will tell me which enum I am using.  Here is my code.  The *it is giving me a null value.</p>
  
  <pre><code>    for(std::set&lt;CreateAndUseIniFile::iniFileValues&gt;::iterator it=m_modules.begin(); it!=m_modules.end(); ++it)
  {
      switch(*it)
      {
      case CreateAndUseIniFile::VOLTAGE1_OFFSET:
          break;
      case CreateAndUseIniFile::VOLTAGE12_OFFSET:
          break;
      case CreateAndUseIniFile::VOLTAGE123_OFFSET:
          break;
       }
  }
  </code></pre>
  
  <p>Here is the code where I added to the set</p>
  
  <pre><code>    m_modules.insert(CreateAndUseIniFile::VOLTAGE1_OFFSET);
  m_modules.insert(CreateAndUseIniFile::VOLTAGE12_OFFSET);
  m_modules.insert(CreateAndUseIniFile::VOLTAGE123_OFFSET);
  </code></pre>
  
  <p>Here is the enum</p>
  
  <pre><code>class CreateAndUseIniFile {
   public:
  
  enum iniFileValues
  {
      VOLTAGE1_OFFSET,
      VOLTAGE12_OFFSET,
      VOLTAGE123_OFFSET
      }
    std::set&lt;CreateAndUseIniFile::iniFileValues&gt; m_modules;
  };
  </code></pre>