I made an edit as an anonymous user. How can I get the reputation if my edit is accepted?
You can't have your cheese and eat it.
You won't. You get reputation as the user who did the edit, and if you figured you wanted to edit anonymously for any reason, you're not getting the reputation for the edit.
So if you want to get reputation for an edit, you're going to have to own up, and take responsibility for it too.