1)http://www.cplusplus.com/reference/clibrary/cstring/memcpy/

2) % is modular operator it does not means "percent"

total_frames%80 means divide total_frames by 80 and return the remains:
f.i.
if total_frames is 139, total_frames%80 will be equal to 59,
if total_frames is 160, total_frames%80 will be equal to 0,
if total_frames is 162, total_frames%80 will be equal to 2
...

3) explain better, how does your struct looks?


3333333333