Primary expressions needed !!

hi ! i cant seem to find the problem in the code. The errors are:
39 primary-expression before "double"
39 expected primary-expression before "char"
39 expected primary-expression before "unsigned"

#include<iostream>
#include<sstream>
using namespace std;
const string VERSION = "JEWELLERY";
const int MAXSIZE = 1000; // maximum number of records allowed


// function prototypes
void runMenu();
void displayMenu();
void clrscr();
void pause();
int numericalMenu(string);
double calculateItemCost ( double itemPrice, char discountType, unsigned quantity);
void displayTotalCost ( double totalCost, unsigned recordNum );
int readSaleRecord ( unsigned & itemId, double & itemPrice, char & discountType, unsigned & quantity);

int main()
{
double option;
double allItems[MAXSIZE];
int recordNum;
int discountRate;
return 0;
}

void runMenu(double allItems, int & itemId)
{
int option;
string word, msg = "Sale Record: ( 101024, 199.95, D, 1)"; // displaying the message
do
{ option = numericalMenu(msg);
msg = "";
switch(option)
{
case 1: // calculate the item cost
double itemCost;
cout << "\nProcessing task " << option << "...\n";
calculateItemCost( double itemPrice, char discountType, unsigned quantity);
msg = '0' + option;
msg += " was last selected\n";
system("pause");
break;
case 2: // Display the total cost
cout << "\nProcesssing task " << option << "...\n";
void displayTotalCost ( double totalCost, unsigned recordNum, bool aborted);
msg = '0' + option;
msg += " was last selected\n";
system("pause");
break;
case 3: // list sale records
cout << "\nProcessing task " << option << "...\n";
int readSaleRecord ( unsigned & itemId, double & itemPrice, char & discountType, unsigned & quantity);
msg = '0' + option;
msg += " was last selected\n";
system("pause");
break;
}
}


while(option!=0);
}
void clrscr() //clear screen
{
system("cls");
}
void pause() //stops
{
system("echo.");
system("echo.");
system("pause");
}
void exit() //exit
{
exit(0);
}
void displayMenu(string msg) //displays menu
{
clrscr();
cout << msg << "\n *** JEWELLERY ***\n";
cout << "\n-------------------- MAIN MENU --------------------\n";
cout << "\n1. Calculate Item cost";
cout << "\n2. Display the total cost";
cout << "\n3. List the sale records";
cout << "\n4. Calculate the standard deviation";
cout << "\n---------------------------------------------------\n";
cout << "\nYour Choice => ";
}

//-----------------------------------------------------------------------------------------------------------------------------------------------------------

//calculate the item cost
double calculateItemCost( double itemPrice, char discountType, unsigned quantity, double itemCost)
{
cout << "Enter itemPrice: ";
cin >> itemPrice;
cout << "Enter discountType: ";
cin >> discountType;
cout << "Enter quantity: ";
cin >> quantity;
itemCost = itemPrice * discountType * quantity;
cout << "The itemCost is " << itemCost;

return 0;
}

// display the total cost
void displayTotalCost ( double totalCost, unsigned recordNum, bool aborted)
{
if ( recordNum >0)
cout << "\ndisplayTotalCost: \n";
else ( recordNum <0);
cout << "Input terminated by invalid data at record";

return;
}

// display the sales record
int readSaleRecord ( unsigned & itemId, double & itemPrice, char & discountType, unsigned & quantity)

{
cout << "Enter itemId: ";
cin >> itemId;
cout << "Enter itemPrice: ";
cin >> itemPrice;
cout << " Enter discountType:";
cin >> discountType;
cout << " Enter quantity: ";
cin >> quantity;

system("PAUSE");

return 0;
}






It'd be helpful if you used code tags so I knew where the line numbers were.
When you call a function, you don't include the parameter types in the call.
Topic archived. No new replies allowed.