C++ to PHP conversion

Asked

Viewed 355 times

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?

  • Missing variable lpbBuf

  • 1

    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

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.