Question: I often see the following function declaration:

```
some_func(const unsigned char * const buffer)
{

}

```

Any idea why the const is repeated before the pointer name?

Thanks.

Answer: 
The first `const` says that the data pointed to is constant and may not be changed whereas the second `const` says that the pointer itself may not be changed:

```
char my_char = 'z';
const char* a = &my_char;
char* const b = &my_char;
const char* const c = &my_char;

a = &other_char; //fine
*a = 'c'; //error
b = &other_char; //error
*b = 'c'; //fine
c = &other_char; //error
*c = 'c'; //error

```
assuming const unsigned char \* const

Everyone is correct that its a const pointer to a const unsigned char.

C++ types read mostly *right to left* unless there are any modifiers on the far left then these read left to right.