|
|
|
|
|
|
|
 |
|
|
|
|
|
|
|
|
//******************************************************************
// Graph program
// This program generates bar graphs of monthly sales
// by department for two Chippendale furniture stores, permitting
// department-by-department comparison of sales
//******************************************************************
#include <iostream.h>
#include <iomanip.h> // For setw()
#include <fstream.h> // For file I/O
void GetData( ifstream&, int&, float& );
void PrintData( int, int, float );
void PrintHeading();
int main()
{
int deptID1; // Department ID number for Store 1
int deptID2; // Department ID number for Store 2
float sales1; // Department sales for Store 1
float sales2; // Department sales for Store 2
ifstream store1; // Accounting file for Store 1
ifstream store2; // Accounting file for Store 2
store1.open(store1.dat);
store2.open(store2.dat);
if ( !store1 || !store2 ) // Make sure files
{ // were opened
cout < ** Can't open input file(s) ** < endl;
return 1;
}
PrintHeading();
|
|
|
|
|
|