Hi, everyone,can someone help me..??

warning C4551: function call missing argument list
error C2447: '{' : missing function header (old-style formal list?)
error C2059: syntax error : '}'
error C2143: syntax error : missing ';' before '}'
error C2059: syntax error : '}'
error C2447: '{' : missing function header (old-style formal list?)
error C2447: '{' : missing function header (old-style formal list?)
error C2447: '{' : missing function header (old-style formal list?)
error C2447: '{' : missing function header (old-style formal list?)

#include <iostream>
using namespace std;
bool getEmployeeData(int*, char*, float*);
float calculateGrossPay();
void displayEmployeeInfo();
bool tryAgain(char);
bool isValidStatus(char);

int main()
{
getEmployeeData;
calculateGrossPay();
displayEmployeeInfo();
}

bool getEmployeeData(int* id, char* status, float* xxx);
{
cout << "Enter employee ID ====> ";
cin >> id;
if(id < 0)
{
return false;
}else
{
cout << "Enter payroll status (s/h/c) ====> ";
cin >> status;
while(!isValidStatus(status*))
{
cout << "Invalid payroll status.\n Try again? Q or q to quit, any other key to continue: ";
cin >> char key;
if(tryAgain(key))
{
cout << "Enter payroll status (s/h/c) ====> ";
cin >> status;
}else
{
return false;
}

}
switch(status)
{
case 's':
case 'S':
cout << "Enter monthly salary ====> ";
cin >> xxx;
break;
case 'h':
case 'H':
cout << "Enter number of hours worked this month ====> ";
cin >> xxx;
break;
case 'c':
case 'C':
cout << "Enter total sales for this month ====> ";
cin >> xxx;
break;
}
return true;
}
}
}
bool tryAgain(char character);
{
if(character == 'Q' || character == 'q')
{
return false;
}else
{
return true;
}
}

bool isValidStatus(char stat);
{
if(stat == 's' || stat == 'S' || stat == 'h' || stat == 'H' || stat == 'c' || stat == 'C')
{
return true;
}else
{
return false;
}
}
float calculateGrossPay(char* stat, float* pay);
{
float gross;
switch(stat)
{
case 's':
case 'S':
gross = *pay;
break;
case 'h':
case 'H':
gross = *pay * 18.75 << endl;
break;
case 'c':
case 'C':
gross = *pay * 0.06 + 1000<< endl;
break;
}
return gross;
}
void displayEmployeeInfo(int* id, char* stat, float* pay);
{
cout << "Employee ID: "<< id << endl;
switch(stat)
{
case 's':
case 'S':
cout << "Payroll Status: Salaried" << endl;

break;
case 'h':
case 'H':
cout << "Payroll Status: Hourly"<< endl;
break;
case 'c':
case 'C':
cout << "Payroll Status: Commissioned"<< endl;
break;
}

cout << "Gross Pay: $" << pay << endl;
}
Looks like you missed a bracket ('{' or '}') somewhere, which is easy to believe with that formatting...
1
2
bool getEmployeeData(int* id, char* status, float* xxx);
{


Semicolons go after prototypes, yes.

But do not put them there when you're defining the body of a function.
Topic archived. No new replies allowed.