Print out a nice table using pointers of the budget areas


You are to develop a budgeting report for a local company using a C++ program. There are two input files. The first input file lists the individual areas a budget has been defined for. Two of these are the two checking accounts where the budget is the amount of money in the accounts. The 'ledger.dat' file contains the list of budget areas.

A second file contains the list of invoices and written checks against a given budget.
You are to read in the second file 'journal.dat' and update the value in each of the budgeted areas.
Print out a report showing the budgets and their current values. Some will be under and other will be over budget.

Use an array of structures to hold the data. Use pointers to move through the array (no subscripts syntax). Read in the 'ledger.dat' and initialize the array of structs. Read in the 'journal.dat' and update the values in the array of structs.

Format of 'ledger.dat' file.
budget# budget name initialValue

Format of 'journal.dat' (More data on a line of input than you need.)
Budget# Number? date ExpenseAreaText ExpenseValue
ExpenseValue is a positive for cost and negative for deduction

Print out a nice table (using pointers) of the budget areas and the resulting balance.

Attachment:- journal.zip

Solution Preview :

Prepared by a verified Expert
C/C++ Programming: Print out a nice table using pointers of the budget areas
Reference No:- TGS01255599

Now Priced at $20 (50% Discount)

Recommended (97%)

Rated (4.9/5)