Question: Is it possible to rebind digits. That, for example, "5" is "$", and "%" is "5"?

In [evil-maps.el](https://github.com/emacsmirror/evil/blob/master/evil-maps.el) digits are defined like this.

```
(define-key evil-motion-state-map "1" 'digit-argument)
(define-key evil-motion-state-map "2" 'digit-argument)
...

```

I tried the answer of @ChillarAnand

```
(add-hook 'evil-mode-hook 'evil-mode-bindings)

(defun evil-mode-bindings ()
  "Bind symbols to digits."
  (define-key key-translation-map (kbd "%") "5")
  (define-key key-translation-map (kbd "*") "8")
  )
(define-key evil-normal-state-map "5" 'evil-beginning-of-line)
(define-key evil-normal-state-map "8" 'evil-end-of-line)

```

But `Shift-5` still does not behave like `5`, the same is true for `8`.
Is it possible to fix it for the config above?

The same stands for @tarblet solution.

What I use as a test is a sequence `Shift-5`, `G`.

Answer: 
You have `#ifndef TOKEN_H_` around your `main` function, which makes no sense. That `#ifndef` is called a *header guard*, and it's used to protected headers from being included multiple times. Your main function should go into a source file (.c or .cpp or the like). You do not need header guards in source files since they aren't included from other source files.

You need your main.cpp file to be like this:

```
#include <iostream>
#include "token.h"
// other stuff, like the using namespace

int main() { /* then your main function. */ }

```

Actually, most of your source files will follow this sort of pattern. This is the same pattern your Token.cpp file is built with.
You are not incluiding the token header `#include "token.h"`, thus, the compiler think that `Token myToken;` is a definition not a declaration, also you don't need the header guards