How to add offset to a character pointer?
<p>I have a the following declarations :- </p>

<pre><code>char szsrcBuf[10000];    /* stores main bufer */
int iOff2Verify;         /* offset to start of verify area*/
int iLen2Verify;         /* length of data to verify */
</code></pre>

<p>Now when I call the function with the following parameters :- </p>

<pre><code>/* process data to verify */
if ((iRet = Verify_Mid(&amp;mach, (char *)(szsrcBuf + (int)iOff2Verify),
                iLen2Verify)) != 0)
    break;
</code></pre>

<p>The signature for the Verify_Mid() looks like :-</p>

<pre><code>int CALLBACK Verify_Mid(bsapi_id *mach, char *inputData, int inputDataLen);
</code></pre>

<p>Things work great. </p>

<p>-------------------xxx above is the is my first way of coding, that works. xxx----------------------</p>

<p>However my code started getting big enough, where I need to re-structure the function of my original call. So I split out the part where I am calling Verify_Mid.... as such:-</p>

<pre><code>iRet = Verify_Request(x, y, szsrcBuf, z, &amp;iOff2Verify, iLen2Verify, (char *)abc, &amp;iabcLen);
</code></pre>

<p>The signature for the new helper function Verify_Request is:-</p>

<pre><code>int CALLBACK Verify_Request(unsigned char *x, int y, unsigned char *szsrcBuf, char *z, 
                            int *iOff2Verify, int iLen2Verify, char *abc, int *iabcLen);
</code></pre>

<p>Now inside my Verfiy_Request () :-</p>

<pre><code>do{
   ..... stuff....


/* process data to verify */
if ((iRet = Verify_Mid(&amp;mach, (char *)(szsrcBuf + (int)iOff2Verify),
        iLen2Verify)) != 0)
        break;

.... stuff .....

}while(0);
</code></pre>

<p>Until this point everything looks ok (on the apparent), however when I go to my Verfiy_Mid (), there is an error reading the 2nd parameter (char * inputData)... I have tried a couple of things with how I am passing the 2nd parameter, but to no avail... can anyone help me understand how to add the offset and then correctly pass it as a parameter to my next function ?</p>