memcpy with startIndex?

后端 未结 9 1234
星月不相逢
星月不相逢 2020-12-24 11:31

I wish to copy content of specific length from one buffer to another from a specific starting point. I checked memcpy() but it takes only the length of content

9条回答
  •  天涯浪人
    2020-12-24 12:07

    I always prefer the syntax

    memcpy( &dst[dstIdx], &src[srcIdx], numElementsToCopy * sizeof( Element ) );
    

提交回复
热议问题