title: Iterating over list of structs
body: <p>I'm creating a list of structs:</p>
  
  <pre><code>struct task{
      int task_id;
      bool is_done;
      char* buffer;
      int length;
  
  } task;
  list&lt;task&gt; taskList;
  </code></pre>
  
  <p>And trying to iterate over the tasks in order to check the is_done status:</p>
  
  <pre><code>    for (std::list&lt;task&gt;::const_iterator iterator = taskList.begin(), end = taskList.end(); iterator != end; ++iterator) {
  
          if(iterator-&gt;is_done) {
              return 1;
          } else {
              return 2;
          }
      }
  </code></pre>
  
  <p>Where am I wrong?
  I get: Missing template argument before '->' token</p>