I have some old code of mine which i dont understand why i did some thing .
I have a pointer which is int_16t *q
, of 1024 ints . now i am trying to copy it with :
buffersRing[ringNum][0]=inNumberFrames;
memcpy(buffersRing[ringNum]+1, q, inNumberFrames * sizeof *q);
when first place in array is some int variable, and all other place after that are q.
But, why i havnt done that(and whats the difference ) :
buffersRing[ringNum][0]=inNumberFrames;
memcpy(buffersRing[ringNum][1], q, inNumberFrames * sizeof *q);
Is it trying to put all q ints into the first place in array ? or is it the same?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…