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

  • SEARCH
  • Home
  • 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 8466061
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T15:13:53+00:00 2026-06-10T15:13:53+00:00

My program is inserting (with [] operator]) some data[addresses] into the std::map. I can

  • 0

My program is inserting (with [] operator]) some data[addresses] into the std::map. I can track inserting of 137 elements.They all are inserted with valid values.

In some stage I iterate the map and try to do some manipulation with the values[addresses]
I`ve set a breakpoint right before I start to iterate the map.
When I check the map in debugger I still see 137 elements.But when I iterate it until the

iterator != map.end I discover ,that the map has 138 values – the last one is illegal.

I need to find a way to detect when this last problematic value is inserted.I use VS 2010.

Thank you

  • 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-10T15:13:55+00:00Added an answer on June 10, 2026 at 3:13 pm

    You could try placing conditional breakpoints in the insertion functions of std::map

    For me (using VC10), the appropriate places are line 755 (for std::map::insert) and line 767 (for std::map::operator[]) of C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xtree

    You can add a condition on each breakpoint of _Mysize == 137 to catch the insertion which increases the map size to 138.

    The most likely culprit is probably the operator[] since it’s easy to mistakenly think of this as an accessor only.

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

Sidebar

Related Questions

i have a problem in inserting some data into a table. I have done
My program contains three textfields and I am inserting the data into an sqlite
So the main program is in C#. Inserting new records into a VFP database
I am inserting metadata into postscript files with a program, to be distilled to
I have a libpq program that is routinely inserting numbers into a database. These
I have a program that reads financial data in JSON and inserts it into
I am creating a program that is going to insert data into a table
I am having an issue inserting data from a Java program. My issue is
The problem is with inserting json strings into MySQL database. In my python program
This is a pretty simple problem. Inserting data into the table normally works fine,

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.