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?
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?
It is obvious why the first person voted to close. They also left a comment:
Your
begin
andend
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.