That seems to be a fairly straightforward case of opening a file and outputting some text to it. And the same again for the second file. The tutorial covers that: http://www.cplusplus.com/doc/tutorial/files/
Also, the sample file contents you show above is delimited by the tab character '\t'. It would be represented inside your program like this: