Too many arugments to function

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
#include <iostream>

struct userProfile
{
    int userNumber;
    std::string name;
    std::string address;
    std::string number;
};


void userImport(userProfile user[])
{
    return;
}

void userBrowse(userProfile user[])
{
    return;
}

void userSearch(userProfile user[])
{
    return;
}

void userExit()
{
    return;
}


void clearScreen(int maxAmount)
{
    for (int i = 0; i < maxAmount; i++)
    {
        std::cout << std::endl;
    }
}

int menuOptions()
{
    clearScreen(100);
    int userInputMenuChoice;
    std::cout << "Welcome to the main menu" << std::endl << std::endl;
    std::cout << "1. Import a user" << std::endl;
    std::cout << "2. Browse the user database" << std::endl;
    std::cout << "3. Search for a user" << std::endl;
    std::cout << "4. Exit" << std::endl;
    std::cout << "Please choose and option ranging from 1 to 4: ";
    std::cin >> userInputMenuChoice;
    return userInputMenuChoice;
}


int main()
{
    userProfile user[999];
    bool runProgram = true;

    while (runProgram)
    {
        switch(menuOptions(user))
        {
        case 1:
            userImport(user);
            break;
        case 2:
            userBrowse(user);
            break;
        case 3:
            userSearch(user);
            break;
        case 4:
            userExit();
            break;
        default:
            std::cout << "Please enter a value between 1 and 4";
            break;
        }

|63|error: too many arguments to function 'int menuOptions()'


I'm not too sure what this error means, Would someone be able to explain it to me or link me to an explanation?
I'm not too sure what this error means
How many arguments you allowed to be p[assed in your menuOptions function? (Hin its declaration is on line 41)

And how many variables you are trying to pass to it? (Line 63)
Topic archived. No new replies allowed.