title: error C3892: 'std::_Tree_unchecked_const_iterator
body: <p>plz help me for this error and ... (visual studio 2010)</p>
  
  <pre><code>void file_remove(u32 id, int action) {
      file f;
      f.id = id;
  
      **file_set::iterator i = fs.find(f);**
  
      if(i == fs.end()) return;
  
      // move cursor away
      if(conf.expose.cursor == id) cursor_down();
      if(conf.expose.cursor == id) cursor_up();
      if(conf.expose.cursor == id) conf.expose.cursor = 0;
  
  
      if(action != 1 &amp;&amp; i-&gt;size &gt;= conf.files.incomp_min_size &amp;&amp;
          (u64)segment_summ(i-&gt;seg) * 100 / i-&gt;size &gt;= conf.files.incomp_percent)
      {   action = 2;     }
  
      char n1[0x100];
      char n2[0x100];
  
  
      if(!i-&gt;deleted){
          cache_close(i-&gt;h);
  
          snprintf(n1, sizeof(n1), "%s/%s", conf.fnames.dir_temp, i-&gt;name.c_str());
  
          if(action == 0)
          {   // just close
          }
          else if(action == 1)
          {
              snprintf(n2, sizeof(n2), "%s/%s", conf.fnames.dir_ok, i-&gt;name.c_str());         seg(*i, conf.fnames.dir_temp, false);
          cache_move(n1, n2);
          }
          else if(action == 2)
          {
              snprintf(n2, sizeof(n2), "%s/%s", conf.fnames.dir_incomplete, i-&gt;name.c_str());
          seg(*i, conf.fnames.dir_incomplete, true, true);
          seg(*i, conf.fnames.dir_temp, false);
          cache_move(n1, n2);
          }
          else if(action == -1)
          {
              seg(*i, conf.fnames.dir_temp, false);
          cache_move(n1, ""); // unlink
          }
      } else {
          ffs_remove(i-&gt;size, i-&gt;tag);
          fs.erase(i);
          sort_files();
          return;
      }
  
      if(!i-&gt;tmp){
          ffs_remove(i-&gt;size, i-&gt;tag);
          fs.erase(i);
      } else {
          **i-&gt;deleted = true;**
      }
      sort_files();
  }
  </code></pre>
  
  <p>compile it and error with this element : i->deleted = true; + view this result</p>
  
  <blockquote>
    <p>1>main.cpp(478): error C3892:
    'std::_Tree_unchecked_const_iterator&lt;_Mytree,_Base>::operator ->' :
    you cannot assign to a variable that is const 1>          with 1><br>
    [ 1><br>
    _Mytree=std::_Tree_val,std::allocator,false>>,
    1>              _Base=std::_Iterator_base 1>          ]</p>
  </blockquote>
  
  <p><a href="http://up.vbiran.ir/images/w21nnbxc7tf5okzk0lr.png" rel="nofollow">http://up.vbiran.ir/images/w21nnbxc7tf5okzk0lr.png</a></p>
  
  <p><a href="http://up.vbiran.ir/images/x0coajrixr764g49ibeh.png" rel="nofollow">http://up.vbiran.ir/images/x0coajrixr764g49ibeh.png</a></p>
  
  <p>plz help me for resolve this error</p>