Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8256605
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T01:54:29+00:00 2026-06-08T01:54:29+00:00

plz help me for this error and … (visual studio 2010) void file_remove(u32 id,

  • 0

plz help me for this error and … (visual studio 2010)

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 && i->size >= conf.files.incomp_min_size &&
        (u64)segment_summ(i->seg) * 100 / i->size >= conf.files.incomp_percent)
    {   action = 2;     }

    char n1[0x100];
    char n2[0x100];


    if(!i->deleted){
        cache_close(i->h);

        snprintf(n1, sizeof(n1), "%s/%s", conf.fnames.dir_temp, i->name.c_str());

        if(action == 0)
        {   // just close
        }
        else if(action == 1)
        {
            snprintf(n2, sizeof(n2), "%s/%s", conf.fnames.dir_ok, i->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->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->size, i->tag);
        fs.erase(i);
        sort_files();
        return;
    }

    if(!i->tmp){
        ffs_remove(i->size, i->tag);
        fs.erase(i);
    } else {
        **i->deleted = true;**
    }
    sort_files();
}

compile it and error with this element : i->deleted = true; + view this result

1>main.cpp(478): error C3892:
‘std::_Tree_unchecked_const_iterator<_Mytree,_Base>::operator ->’ :
you cannot assign to a variable that is const 1> with 1>
[ 1>
_Mytree=std::_Tree_val,std::allocator,false>>,
1> _Base=std::_Iterator_base 1> ]

http://up.vbiran.ir/images/w21nnbxc7tf5okzk0lr.png

http://up.vbiran.ir/images/x0coajrixr764g49ibeh.png

plz help me for resolve this error

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T01:54:30+00:00Added an answer on June 8, 2026 at 1:54 am

    Yes, it is this line that is the problem

    i->deleted = true; 
    

    In a std::set all the elements are const (because changing the value might invalidate the order of the set).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

am getting this error when i open my site in internet explorer......... plz help
i m new to iphone ... trying this code but getting some error help
the following query throwing error. plz help me & tell me what is the
Please Help Me~ :) Under code complie successful on visual studio. but, Under code
I am new to objective c,so plz me help with this... i have used
Hey guys plz help I am trying to convert this html to jade using
Do you know any elegant way to achieve this in ruby plz ? string
Griffon JMX Plugin 0.3 don't work. anyone use this version 1.got error: no lib
I am getting this error while installing plugin present on site http://www.bin-co.com/blog/2009/07/export-to-wordpress-joomla-plugin/ JFolder::create: Could
hey i am new to c# plz help. i am writing a program that

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.