Easy Explanation Of Pointers

Easy Explanation Of Pointers
pointers-memes, c-memes, cpp-memes, void-pointer-memes, memory-management-memes | ProgrammerHumor.io

So you start with a regular int and everyone's cool. Then you add one asterisk to make it int* and people get a little excited but still following along. Add another asterisk for int** and now we're pointing to a pointer and things are getting spicy.

But void*? That's where your soul leaves your body. It's a pointer to... something. Could be anything. Could be nothing. The compiler has given up on type safety and so have you. It's the programming equivalent of "trust me bro" and the reason why C programmers have that thousand-yard stare.

Fun fact: void* is basically how malloc tells you "here's some memory, figure it out yourself" which is both terrifying and liberating.

More Like This