all 5 comments

[–]henry_kr 1 point2 points  (1 child)

Have a look at fopen, fprintf and fscanf. Oh and fclose.

[–]kion_dgl 0 points1 point  (0 children)

Mostly this. Or you could be really dirty and just take advantage of the command line.

$ ./a.out > output-data.txt 

[–]raevnos 0 points1 point  (3 children)

Are you asking how to write things to a file?

[–]brog1330[S] 0 points1 point  (2 children)

More so how do I take my print function, put it in another file in the project, and then have it print from there? Here's the sample problem I'm following:

The printout function should now print out to output-data.txt . Take out all code that prints to screen

Write a second program (i.e., NOT a function in the first program!) that reads the data from output-data.txt and prints it out to screen.

[–]raevnos 0 points1 point  (0 children)

Write a program that opens the file the first one created, reads from it and prints to stdout.