Pointer alignment in C++ means that a pointer's address must be a multiple of the data type’s alignment requirement. A misaligned pointer occurs when this condition is not met, which can lead to undefined behavior (UB) when dereferenced, Dereferencing a misaligned pointer is UB in modern C++. Always ensure proper alignment when handling raw pointers
How to avoid misalignment?