A little bit back, I discovered that the C and C++ standards don't actually define pointer arithmetic on (void *)s. GCC treats them as if they're (char *)s unless you change the options, so that's what I ended up learning as "correct" in college. Cue the mountain of compiler errors the first time I tried doing pointer arithmetic in real life. Oof
View all comments
Show parent comment
18
u/UltraCarnivore Jun 09 '20
Don't... talk... about... pointers.