-9

My question

Trouble iterating over an object

was closed for either a typo (which I don't see) or because it's not reproducible, which it is. Can I get a little more clarification?

0

1 Answer 1

14

It is obvious why the first person voted to close. They also left a comment:

Your begin and end return a copy of the object (data_vector) instead of a reference (data_vector&).

You replied with:

Makes no difference, but I edited the code anyway

but the first vote had already been cast. So had a second vote for the same reason. (You only get one chance to make a first impression. Best to check and make sure that these sort of typos don't sneak in, even if they don't actually matter.)

What I do not know is why the 3rd close vote got cast, over 15 minutes after you confirmed that was not the problem and updated the question. I guess they missed the fact that you edited to clarify the suspected problem was not the only problem.

Either way, I've re-opened it now. There's nothing wrong with the question, now that you've addressed the suspected typo. I have also deleted the obsolete comments, which were all referring to an older version of the question and may therefore be confusing to future readers.

4
  • I know that the person making that comment has a lot of reputation, but that was no typo. (As evinced by the fact that indulging them didn't fix anything.) More like common practice. Can you tell them not to shoot from the hip like that? Commented May 28, 2020 at 20:32
  • 6
    You want me to tell someone not to be wrong? I'm not sure how successful that will be.
    – Cody Gray Mod
    Commented May 28, 2020 at 20:36
  • Not close a question, especially not without giving a reason, immediately once you see anything marginally off. But never mind. I'll let this go. Commented May 28, 2020 at 20:38
  • 19
    The person who voted to close it did give a reason. They thought they'd found a typo in your code that was causing the problem. Yes, it happened that their assessment of your code was wrong, but that doesn't mean they did anything wrong. It is normal and encouraged to close questions when you think the problem is caused by a typo that would make the answers not useful to others in the future. (Remember that Stack Overflow is not a help desk; rather, we are building a library of answers to programming questions. Helping the person who asked the question is just a side benefit.)
    – Cody Gray Mod
    Commented May 28, 2020 at 20:45

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .