Proper way of casting pointer types
For convertible pointers to fundamental types both casts have the same meaning; so you are correct that static_cast is okay. When converting between some pointer types, it’s possible that the specific memory address held in the pointer needs to change. That’s where the two casts differ. static_cast will make the appropriate adjustment. reinterpret_cast will not. … Read more