Dear CS50 fellow geeks,
Zamyla mentions creating a struct the walkthrough. I am lost as to what type of struct I should create. What should be in the struct?
CS50 Stack Exchange is a question and answer site for students of Harvard University's CS50. It only takes a minute to sign up.
Sign up to join this communityDear CS50 fellow geeks,
Zamyla mentions creating a struct the walkthrough. I am lost as to what type of struct I should create. What should be in the struct?
Similar questions have been asked elsewhere, including by me. While it is apparently possible to use a struct, and I agree, the walkthroughs heavily suggest we ought to use them, apparently a better solution is to store the data in an array instead of a struct, then compare the first four bytes of the array against the desired matches.
See answers to Can I create an element of arbitrary size in a STRUCT?
and Pset4 recover: can't seem to use struct to identify the jpg