Why do people think pointers are evil?

Pointer / memory address (I'm not sure)

Am I correct in assuming that the data type of a pointer (with *) and a reference must be the same as the variable? (At least the compiler did not spit out a warning)

Probably yes.

There cannot be a reference without a special data type that is referenced. Also no reference to anything, or one whose goal changes in the course of the program. (These are all the "messes" that can be made with pointers and that can lead to problems)

Pointers should also always be thought of as typed pointers (even if there is a formal void *).

can be read and understood in two ways:
a) is of the data type (a pointer to int)
are a

Of course there are pointers to everything, including other pointers, objects, or arrays.
The array and pointers are very closely interwoven in C / C ++.

References mainly make sense when passing parameters to a function, if you don't want to give it your own copy of a value, but rather direct access to the variable of interest itself. (Because this is a large object, or because it should be changed) This parameter can then be handled with the simple syntax without having to deal with asterisks or →.

Much fun yet


In C ++, the data types of an array with 10 elements differ from an array with 8 elements. Clearer: the number of elements is part of the data type.
This subtle feature prevents a lot of nasty pointer misuse.

Don't get confused: The “Arduino language” is C ++, but the avr-gcc compiler rarely notices this, and such errors are easily executed incorrectly at runtime.