Hey, what's up? You said on one of my threads that you're a software engineer for a game company. What company do you work for and what projects have you worked on (if you don't mind answering)? Is there any chance that I've played with some of your work?
I was typing a response when Moggy sent you to bed.
Anyways, I see what you did there. I said that it's not that complicated, and you are showing that it can in fact be quite so. I know it makes no difference whether the example used a char* or void*, I was just stalling for time while I ran off to my compiler. In my head I was going okay the array is implicitly dereferenced and then you are casting to a char*, but you're not because of the extra set of parens. So you are just casting the "i", but if it was already declared of type char* that that makes no difference, or does it... ARGHHH *runs off to compiler*.
So if an array of chars i contains "A" at i, then ((char*)i) will still give you "A".
In the case of (char*)i, the value located at i is cast to a pointer, and if any string handling function dereferences it, it will try to access the memory location 65(dec) for "A" and you'll have problems.
Hey man whats up, I am extrimly busy right now with work and all. Trying to make the deadline so I am not on here much, but if you want you could send me your email in a privet message and we can keep in touch with each other that way if you want?