I received the message, "Congrats, you've gained the the privilege - vote up - learn more," in the third link in the top left of Stack Overflow (the bar-chart-like symbol). But when I went to up-vote an answer, I was informed that I didn't have the required 15 rep. When I looked at my reputation, I indeed only have 13 rep, and so fall short of the 15 required for up-voting. Why then was I sent a message saying I had gained that privilege?
Your answer on "my classes cant reach the first variable" was accepted, then unaccepted. The first action triggered the message, and the second removed the privilege.
We don't "revoke" privilege gain messages by design.
You might want to check your recent reputation changes, it is possible that you had the correct amount of reputation but some action caused some of it to be revoked (a down vote on a particular answer of yours is a possibility)