I'm sorry, what did I do wrong here?... I'm sure this has happened before, but could this please be explained? Here's the answer in debate.
closed as too localized by cereallarceny, random Apr 14 '13 at 5:17
This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.
The OP has every right to accept other answers. So he first accepted your answer, then he found another answer he thought was better than yours. So he has unaccepted your answer.
For more details, read this :How does accepting an answer work?
The OP accepted your answer, then changed his/her mind and accepted the other answer.
You did not do anything wrong.
At the time you posted your answer, the OP found it is good answer, so he accepted it and you earned +15.
May be after your acceptance some one else posted another answer, that the OP liked more than yours. So he accepted that answer.
It happens quite often.
In the race to gain points we give the answers. And start looking for other questions. And our answer lack the quality, description, detailed explanation. While someother patiently build their answer better than us.
Take an example.
A question says let a=10; then printf("%d",++a); what will be the answer?
One answer says : 11. he get+4.
After 10 minutes another answer is posted having:
"++a is prefix binary operator, which changes the value and assigs to a, so your a was 10, it got incremented by 1. New value results to 11. To learn more see this link "Prefix and postfix binary operators"