But assuming it doesn't the context is p_ch = the bits above... the code declaring p_ch isn't shown but I'm guessing that the value here is actuality a pointer to a pointer so nothing illegal would be happening.
Lastly... C++ is really lacking in guarantees so you can assign a char to the first byte of an integer - C++ doesn't generally care what you do unless you go out of bounds.
The reason I'm casting to void* is just pure comedy.
In the screenshot it said x = *(++p) and iirc that is not the same as saying x = *(p++) or x = *(p += 1)
As in my example using ++p will return the new value after increment and p++ or p+=1 will return the value before the increment happens, and then increment the variable.
Or at least that is how I remember it working based on other languages.
I'm not sure what the * does, but I'm assuming it might be a pointer reference? I've never really learned how to code in c or c++ specifically. Though in other languages ( like PHP which is based on C ) there is a distinct difference between ++p and (p++ or p+= 1)
The last two behave the same. Though it has been years since I did a lot of coding. Which is why I asked.
I'll install the latest PHP runtime tonight and give it a try xD
That's not a real operator. You've put a space in "i--" and removed the space in "-- >". The statement is "while i-- is greater than zero". Inventing an unnecessary "goes to" operator just confuses beginners and adds something else to think about while debugging.
And yes I have seen beginners try to use <-- and --<. Just stop it.
The sheer number of people that do not expect a joke on this community... (Really, if you are trying to learn how to program pay attention to the one without the Humor on the name, not here.)
It requires some decent knowledge of dereferencing and C++ "++" operator overloads. It's not exactly trivial to glance at and feel confident you know what's happening