c++ - Copying part of an array stored in a memory mapped file -


An array of stores doubles I have memory mapped file, and I want to read the last three entries in the array I (

  is one of zero ReadDataArrayToMMF (double * Detaare, Mamf), Int Srnilembn, Elpisitisarti * Pibifpitiar) (Pratimeri (Detaare (Pivioaidi) * Pibifpitiar, Akarf (double) * Arralenment);} < / Code>  

and use the necessary entries, but it means that the realization Copying whole array of required some values.

I arrayLength before n is a number for receipt of entries n , but in me is having trouble to copy a portion of the array, which had started before. I pBufPTR try to play with the pointer, but the only runtime errors .

The entire array was copied How to do an array of memory / copy center?

nth-element to the start offset :

  const double * offset = reinterpret_cast & lt; Const double *> (* PBufPTR) + n; To copy the last 3 elements:  
  Copimamori (Detaare, Riintrif_kast & lt; Const double * & gt; (* pBufPTR) + Srnilembn - 3, 3 * size (double));    

Comments

Popular posts from this blog

c - Mpirun hangs when mpi send and recieve is put in a loop -

python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

java - Unable to get JDBC connection in Spring application to MySQL -