Question #264694

I have a problem with a coding assignment and am becoming clueless as to how to solve it.


I am working with PGM images and I have read the data and saved it into a buffer (2D array ex. data[width][height])


I have been asked to then transfer that data into an array of 2d arrays of size 8x8 for the 2d arrays and the number of arrays is width*height/64.


How would I go about storing the data from the 2D buffer into the array of 8x8 2D arrays?


Expert's answer

Declare an 8x8 array of strings. Then copy the pixels in the 2D buffer into the array using a for loop


Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

LATEST TUTORIALS
APPROVED BY CLIENTS