please help me get rid of compiler problem "too many argumnets to function"

  c++
int employeeCount(); // hold the value of employee count
int daysAbsent (int employeeCount); // hold the value of days missed
double avgDaysAbsent(int numEmployee, int totalAbsentDays); // calculates average absent days

int main(int argc, char** argv) {
    
    // Declare variables
    
    int totalEmployees();
    int absentDays();
    double averageAbsent();
    
    // Call for a function averageAbsent()
    
    std::cout << "The average days missed past year is: " 
              << averageAbsent(employeeCount(), daysAbsent(employeeCount()));
              
    return 0;
}

int employeeCount() {

    // declare variable to store user input
    
    static int numEmployees;    
    if (employeeCount != 0)
    return numEmployees;
    
    std::cout << "How many employees are in the company?n";
    std::cin >> numEmployees;
    
    // Input Validation
    
    while(numEmployees < 1) {
        std::cout << "Error. Please enter a number greater than "
                  << "or equal to 1!n";
        std::cin >> numEmployees;
    }
    
    return numEmployees;
    
}
    
int daysAbsent (int employeeCount){
    
    // Declare and initialize accumulator to 0
    int totalDays = 0;
    int employeeAbsent;
    
    for(int count = 1; count <= employeeCount; count++) 
    {
        std::cout << "Enter the number of days employee # " 
                  << count << "was absentn";
        std::cin >> employeeAbsent;
        
    // Input Validation
    while(employeeAbsent < 0) 
        {
            std::cout << "Error! Please enter number above or equal to 0n";
            std::cin >> employeeAbsent;
        }
        totalDays += employeeAbsent;
    }
    
    return totalDays;
}

double avgDaysAbsent(int numEmployee, int totalAbsentDays)
{
    double average = (double)totalAbsentDays / numEmployee;
    
    return average;
}

Source: Windows Questions C++

LEAVE A COMMENT