// Program Name: Format_8LbX23.exe // Author: Tyler Travis, Eruption Software // www.travis-usa.com // Date: 3/7/00 //This program formats the output of it's Customer Class data . #include #include #include #include #define NAME_TOTAL 25 class Customers { private: char name[NAME_TOTAL]; int cust_num; long double cust_bal; int zip_code; public: Customers(); //constructor void get_Cust_info(); //prototype to assign values void show_cust_info(); static char exit(); }; void main() { char answer, response; int Custs = 1, x = 0; cout<<""<>response; cin.get(); if(response == 'y') { cout<>Custs; cin.get(); if(Custs > 0) { Customers *ptr2Custclass = new Customers[Custs]; Customers *CustTmp = ptr2Custclass; Customers *CustRead = ptr2Custclass; //show the Constructor member values using these column headers for the screen cout<<" Customer: Account Number: CurrBalance: Zip Code:"<show_cust_info(); cout<get_Cust_info(); //keyboard input //write keyboard entered data to the file Wthtfile.write((char*)(&ptr2Custclass[x]), sizeof(ptr2Custclass[x])); ptr2Custclass++; } cout<show_cust_info(); // shows the input info } delete []CustTmp; }//else response answer = Customers::exit(); }// do while (answer == 'y' || answer == 'Y'); }//main Customers::Customers(void) //constructor { cout< 0.00) { bal_doll = cust_bal * 100; bal_dec = bal_doll % 100; bal_doll = bal_doll / 100; cout<>cust_num; cout<<" Enter their Account Balance: "; cin>>cust_bal; cout<<" Enter their Postal Zip Code: "; cin>>zip_code; cin.get(); cout<>ans; cin.get(); return(ans); }