need to save all of the text that is on the screen to a file

alright so i have my program mostly running off of ncurses and you are a little dude (cursor) and you go around and you can place 'o' and delete 'o' and just kinda build. i want to make it where people plying it can press a button, right now set as z, and it saves everything they have done on the screen, to a different text file so you can just make a copy of the program itself and paste in that saved stuff u made into the copied file of the original program where the starting board is. OR i could have an option to save it somehow to the file with pressing z and then automatially load it back up while in game. i dont want to go crazy with a bunch of lines so keep it as simple as possible. id rather not copy and not understand it :) heres my coded so far. link to pastebin.
http://pastebin.com/C7yhfm4Z
thanks for all the help people! i hope u like my game so far too. i actually find it amusing building all the stuff. it just sucks how i have to save it manually if i want to save it :) remember tho, if u want to run it u need to use ncurses. umm i guess ill put the compiler string too. its different.
gcc -o ncursesv5 ncursesv5.cpp -lncurses
thats what u use tocompile it for anyone who has trouble ;)
As opposed to trying to copy the screen, just record the relevant data you need to bring up the game to that exact state. Sounds like all you need is a position of the player, and coordinates of all 'o's. You can save this in a text file in whatever format you feel is easiest.
in my newer versions there is more objects. i dont know how i could find the positions of the objects and then save them. any examples?
moved to here http://www.cplusplus.com/forum/unices/127018/ please go here and look at this one rather than this.
Topic archived. No new replies allowed.