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.
Meta Stack Exchange is a question and answer site for meta-discussion of the Stack Exchange family of Q&A websites. It only takes a minute to sign up.Sign up to join this community
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 lose reputation when:
- one of your accepted answers loses accepted status: −15
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"