Master file and transaction file

i need some help with this please Write a program that will save the following data in two separate files, Master file and Transaction file:

Master File:
Account Number Name Balance
100 Alan Jones 348.17
300 Mary Smith 27.10
500 Sam Sharp 0.00
700 Suzy Green -14.22


Transaction File:
Account Number Dollar Amount
100 27.14
300 62.11
400 100.56
900 82.17

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:

Master File:
1
2
3
4
5
"Account Number\tName\tBalance\n"
"100\tAlan Jones\t348.17\n"
"300\tMary Smith\t27.10\n"
"500\tSam Sharp\t0.00\n"
"700\tSuzy Green\t-14.22\n"
Last edited on
Topic archived. No new replies allowed.