Advertisement
koodeta

new Struct

May 9th, 2014
192
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.52 KB | None | 0 0
  1. struct cost {
  2.     double alcTax, food, genMerch, meds;
  3.     cost() : alcTax(0.0){}, food(0.0){}, genMerch(0.0){}, meds(0.0){};// Total taxes collected for each tax bracket
  4.     double totalTax;
  5.     cost() : totalTax(alcTax + food + genMerch + meds);// Total Taxes to be accessed later
  6.  
  7.     // Variables used in the accessor functions at the bottom
  8.     double costBeforeTax, costAfterTax, custSaving, totRegPrice, totSalePrice;
  9.     cost() : costBeforeTax(0.0){}, costAfterTax(0.0){}, custSaving(0.0){}, totRegPrice(0.0){}, totSalePrice(0.0){};
  10. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement