January 24th, 2013, 12:51 PM
Two Questions - Return at end of paired data points in CSV file, and how to "break"
I am using the following line to write pairs of data files. I am hoping to create a CSV file.
CODE fprintf(f, "%d,%f", Universe.year, Universe.R); CODE
This simply writes pairs of data on the same line. I'd like pairs of data on individual lines. This means I need to insert a line feed, somehow, perhaps via a character insertion. Could someone please tell me how to do this easily?
Finally, my memory is very vague on C programming. Is the proper means to exit a loop an if then statement containing the term "break"? How would that be implemented?
Last edited by Protocol; January 24th, 2013 at 12:54 PM.
Click Here to Expand Forum to Full Width