1
When converting a code into languages like C++ and other related to PHP we have to convert the direct handling of pointers, in this case, what interpretation should I have about the following code:
long teste(unsigned char *lpMemIn ,unsigned char *lpMemOut, unsigned int uiBitComp,int bPartial,long Max){
lpbData = &lpMemIn[0];
while(lIndex < lNbrByte) {
...
*(lpbData++) = ( lpbBuf[0]<<1 ) | ( lpbBuf[1]>>6 );
...
}
}
It would be the same as arr[i++] = x | y;
?
I can’t imagine what exactly your code is
C++
do, could add the full code?– Guilherme Nascimento
Missing variable
lpbBuf
– Guilherme Nascimento
I think there is a brief explanation of what your C++ algorithm does, sometimes in other languages we can get the same result using different techniques. For example, anyone who understands a lot of PHP and no C++, will hardly understand what this
*(lpbData++) = ( lpbBuf[0]<<1 ) | ( lpbBuf[1]>>6 );
ago– MarceloBoni