urgent point of sale program trouble

so im taking this class over summer school and the teacher isn't really helping me so i'd really appreciate it if someone could find the errors in this program. It's supposed to let the user choose from the menu (keep displaying menu and running total) and the tax has to be a separate function, which I don't know if I'm doing right. It is showing an error so just tell me what I need to fix (and how if possible). It's saying "function does not take 1 arguments". Thanks!
// Rodeo Snack Bar program

#include <iostream>
#include <iomanip>
#include <string>

using namespace std;

void display_menu();
void tax();
float total = 0;

int main()
{
char choice;
display_menu();
cout << setiosflags(ios::showpoint) << setiosflags(ios::fixed) << setprecision(2);

cout << "Welcome to the Rodeo Snack Bar!" << endl;
cout << "Your current total is: $"<< total << endl;
cout << "Please enter the letter of your selection: ";
cin >> choice;
cout << endl;

switch (choice)
{

case 'S': case 's':
cout << "Sandwich - $5.00" << endl;
total+=5;
display_menu();
break;
case 'C': case 'c':
cout << "Chips - $1.50" << endl;
total+=1.5;
display_menu();
break;
case 'P': case 'p':
cout << "Pickle - $0.75" << endl;
total+=.75;
display_menu();
break;
case 'B': case 'b':
cout << "Brownie - $1.00" << endl;
total+=1;
display_menu();
break;
case 'R': case 'r':
cout << "Regular Drink - $2.00" << endl;
total+=2;
display_menu();
break;
case 'L': case 'l':
cout << "Large Drink - $3.50" << endl;
total+=3.5;
display_menu();
break;
case 'X' : case 'x':
cout << "Canceled, please start over." << endl;
total = 0;
display_menu();
break;
case 'T' : case 't':
tax(total);
break;
default:
display_menu();
}


}




void display_menu()
{
cout << endl;
cout << "S - Sandwich $5.00" << endl;
cout << "C - Chips $1.50" << endl;
cout << "P - Pickle $0.75" << endl;
cout << "B - Brownie $1.00" << endl;
cout << "R - Regular Drink $2.00" << endl;
cout << "L - Large Drink $3.50" << endl;
cout << "X - Cancel sale and start over" << endl;
cout << "T - Total the sale" << endl;
cout << "All items have additional 8.25% tax." << endl;
}


void tax(float total)
{

cout << "Sub-total: " << total << endl;
cout << "+ Tax : " << total*0.0825 << endl;
cout << "Total : " << total + (total*0.0825)<< endl;
}
Function declaration for tax() is causing an error.
It should be void tax(float);, not void tax();
Topic archived. No new replies allowed.