LabWindows/CVI

取消
显示结果 
搜索替代 
您的意思是: 

setting memory block with offset

HI,

i am trying to use memcpy function with offset in my application. i want to copy bytes from one buffer to the other starting from 3rd location. i want to leave first 2 bytes as header info. Can somebody help me on this please?

Thanks

0 项奖励
1 条消息(共 2 条)
3,244 次查看

Just add the offset to the buffers adress ( which is identical to the buffer itself in C ) Something like

memcpy ( target+2, source+2, sizeof( source )-2).

And make sure that the target buffer is big enough.

 

2 条消息(共 2 条)
3,238 次查看