I followed how to to write a binary file from this webpage:
Mine is slightly different but basically the same thing. Anyways, when I do mine and it goes through the loop the second time I get a "segmentation fault". Do you guys have any idea why? If needed I'll copy some of the code but it's really very similar to the one from the webpage (just look at the writing the file part, specifically the loop with r.x=i)
Thanks for any help.