I have been trying to figure out casting, and have a quick question I hope someone can help me with:
What exactly is the purpose of casting, like for int, char...etc...:
int x = 5;
I am confused about this? what does it mean, and why is it needed??
Also, I keep seeing code where it mentions casting a pointer:
(void *) something;
Could someone please explain what casting a pointer means and why it is needed??
Thanks a lot for any explanation! It is appreciated!