Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 158 Stack Exchange communities.

What is meta?
Here's how it works:
  1. Any Stack Exchange user can ask a question
  2. The community provides support, votes on ideas, and reports bugs
  3. Your voice helps shape the way Stack Exchange operates

I found an answer under a question that has a code which completely doesn't work for me, but I was able to edit it on the way that it works.

However, I afraid of changing it, since I'm not sure that my code does the same as that I saw in the answer.

What to do? On demand, I may post the related answer with my code.

share|improve this question

marked as duplicate by Cody Gray, hims056, Aziz Shaikh, Tobias Kienzler, Danny Beckett Jul 24 '13 at 7:05

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

How different is it, and why doesn’t it work? Typo(s) = edit, minor mistake = comment, probably, mostly wrong = post your own answer. :) – Ryan O'Hara Jul 23 '13 at 18:32
Was your problem the same as the person that asked the question? If it was, I would post a new answer detailling why it didn't work and the solution you came up with. – Jonathan Drapeau Jul 23 '13 at 18:33
Very closely related: Incorrect code: edit, comment, or provide a correct answer? – Josh Caswell Jul 23 '13 at 18:33
@minitechη I meant that my compiler writes syntax error for the answered code(mistakes that appear before compiling), but I'm not sure that I'm not the only one with this problem. – Zoltán Schmidt Jul 23 '13 at 18:34
@ZoltánSchmidt: If it’s just a missing semicolon or brace, it’s generally okay to add that as an edit. – Ryan O'Hara Jul 23 '13 at 18:36
I posted an answer; I think I was right. Thanks for the tips! – Zoltán Schmidt Jul 23 '13 at 18:49
up vote 7 down vote accepted

If you're not sure that the code is the same you post another answer.

For additional brownie points explain what your answer does and why it works. For double brownie points you also explain the differences between your answer and the other.

You never know, you may even get some reputation out of it.

If the code in the question is only incorrect because of a typo, or a really simple fix, then it's best to comment under the answer. Possibly suggest an edit if it's just a typo, as minitech suggests, as your answer would be as good as identical to the other.

share|improve this answer
Doesn't reflecting to an another answer below the question count as being "off-topic"? – Zoltán Schmidt Jul 23 '13 at 18:35
No @ZoltánSchmidt, it shows awareness of the other answers and of the full details of the question; if it's close though it's best to explain the differences so others are aware of why it's different. My answer is contingent on it not being a typo as per minitech's comments though. – ben is uǝq backwards Jul 23 '13 at 18:37
Also, if your problem is sufficiently different from the original question, it may be worth posting a new question and checking the "Answer your own question – share your knowledge, Q&A-style" box – cadrell0 Jul 23 '13 at 18:44
I don't want to take the risk with it, since I'm still learning and I don't think that I may know something that the army of programmers wouldn't know here - I may be even wrong. But of course, thanks for helping! – Zoltán Schmidt Jul 23 '13 at 18:48
We all start out at the beginning @ZoltánSchmidt... there's no shame in that. You may be wrong but unless you're willing to risk it you'll never learn. It's good to be wrong occasionally because then someone can tell you why. – ben is uǝq backwards Jul 23 '13 at 18:50
Curious that what you call "brownie points", I call "requirements for an upvote". :-) – Cody Gray Jul 24 '13 at 4:28
Upvotes are brownie points. Not all posts get 'em. – KatieK Jul 24 '13 at 5:01

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