change printf() to fprintf()
WaltP
Posting Sage w/ dash of thyme
10,506 posts since May 2006
Reputation Points: 3,348
Solved Threads: 944
So change all the printf() 's
WaltP
Posting Sage w/ dash of thyme
10,506 posts since May 2006
Reputation Points: 3,348
Solved Threads: 944
How much programming do you know?
WaltP
Posting Sage w/ dash of thyme
10,506 posts since May 2006
Reputation Points: 3,348
Solved Threads: 944
Actually, I have an assignment from school in which i have to simulate the functioning of a dialog box in dos.
What does this assignment have to do with capturing screen-display into a file? Your program knows what it displayed on the screen previously, just re-display that when you're finished with your simulated dialog box. Depending on the details of which compiler you're using for school, you may be able to use
system("cls");
as a non-portable way to clear the screen before drawing the dialog box, and after "closing" it and re-displaying what was there previously. Once you have more basic stuff done, you may want to look into a "curses" library for better control over where text is displayed in your terminal window, but that sounds more advanced than you really need. Not to mention trying to go back and scrape the current contents of your window into a file, and then read that file back and re-populate your window from it.
raptr_dflo
Practically a Master Poster
602 posts since Aug 2010
Reputation Points: 76
Solved Threads: 82