On Mon, Dec 13, 1999 at 08:04:28PM -0800, Dale Appleby wrote:
> OK, I realize this is pretty simple but...
>
> I have wrote a simple program to keep stats for our local pool league...
>
> Problem is I can't figure out how to save the data to disk (and get
> the same values back).
You have lots of options. Do you want save straight data without
regard to format, or are you saving formatted data?
> Could someone please show me how to save, for eg: int a[10]
> to disk, and then retrieve the same values back into "a"?
For example, for formatted output:
*fptr = fopen("somefile", "w");
if(fptr != NULL) {
fprintf(fptr, "%d", a[10]);
} else {
fprint(stderr, "%s\n", "write to 'somefile' failed\n");
}
Short version: please provide more information.
Kurt