The type of pointers tells the compiler about the type of thing the pointer points to, which allows the compiler to make sure that you use the pointer correctly and try to make sure that you are not making any mistakes.
The compiler, with its errors and warnings, is struggling to make sure that the code you are developing is correct. Listen to them - people who write compilers are trying to help you.
source share