Right. Ok, you read my mind...I assumed it was in a particular place. However, I'm reading your mind now, and saying I did NOT assume that it was in the same place as where the problem first appeared, as you believe. YOU assumed I assumed. It is because of posters like you that I actually worded my posts the way that I did to start with, because I have had experiences with poster named 'grumpy' before (aptly named too...). I figured you would react the way that you reacted, and assume I didn't go to any effort to fix my problem. And how dare you say I didn't go to any effort...as if you're seeing through my eyes, and thinking with my mind. You're in no place to judge, my friend...honestly, you have no way of knowing for sure what the truth is in another person's life. You can only speculate and conjecture, going from some words someone has spouted forth. As a matter of fact, I DID go to more effort than you think I did. I didn't just look in the original place of the problem. I looked elsewhere too. But still I did not spot the problem, because I didn't know the right place to look.
Originally Posted by grumpy
Ohh...right. And I didn't do that??? Again, this is only your conjecture talking. The real truth of the matter is, I...and I will emphasize this....DID...COMMENT OUT LINES AND RECOMPILED and RUN AGAIN...etc. Do you really think I did not think to do that, or was simply too lazy to do that? That is some bull........, man, because that is not so. I did do all that, but still was not able to locate the real cause of the problem. I knew it was related to attempting to add elements to the vector inside of the map, but all the references I looked at on segfaults showed things like doing things with pointers to objects that don't exist anymore, or attempting to dereference a pointer that was previously deleted, etc. All of the things it said could be the cause, I looked for in my code, but still did not spot it. But that was because I didn't know how the internals of the std::map worked. But now I know a little more about it, thanks to kdmv.
By removing code unrelated to your problem, I am not suggesting all you needed to do was post the one line where you thought the problem is. I am advocating a problem solving approach that is more robust than "I think the problem is here, but here's the rest of my mess for you to sift through while I go and look at other things". If you had removed (or commented out) some lines, recompiled, run again you would have been able to narrow down on the actual cause. And, if you had done that and still not understood why the problem was occurring, other people would have had a more tractable problem to address.
Again, this is something you think I did not do, but I did. But I see there's no point in trying to convince you that I did...you're stuck on that same mindset that everyone who asks help for a problem should have gone to incredible amounts of effort to fix the problem themselves before even thinking to ask for help or advice.
This forum exists to help people with problems, true. But the art of asking for help in forums is that you contribute to solving your own problem, through effort to narrow things down, through investigations in which you might find the problem yourself. Not just being lazy, giving up when things aren't immediately obvious, and expecting others to sort through your mess.
Yeah...keep telling yourself that one. And maybe one of these centuries, someone will actually believe it.
That is where your logic is faulty. People contribute to forums to help people who help themselves, but get in trouble. They do not participate to help people who expect others to do the hard yards that they should do.
And as if I was actually thinking like that...
Man, you don't even know WHAT I'm thinking right now. And I don't know what you're thinking right now...nor do I want to know.
I rest my case. :D