I am writing a code for a simple calculator that will perform several decimal conversions (I am currently concerned with 1 as of right now). Essentially after the user makes the selection in the menu (switch statement) I want to have a separate function to perform the actual conversion (math) and a function that is reserved for the solution (output). I need help with passing the binaryarray created in mathoption1 to outputoption1. The code now does not compile, I have 4 errors associated with the parameters of some of the functions. Obviously, I am lost and could use some guidance.
#include <iostream>
using namespace std;
void display();
void menu(int &option, int decimal, int binaryarray[]);
void outputoption1(int decimal, int binaryarray[]);
void mathoption1(int &decimal);
int main()
{
    int option;
    int decimal;
    int binaryarray[32];
    display();
    menu(option, decimal, binaryarray);
    return 0;
}
void display()
{
    cout << "Industrial Engineering Decimal Conversion v 1.0\n" << endl;
    cout << "Created by: asdf adsfadf\n"
         << "\t    adsfa adsfad\n" << endl;
    cout << "On the next screen, you will choose which operation you want to perform\n" << endl;
    system("PAUSE");
    cout << "\n" << endl;
}
void menu(int &option, int decimal, int binaryarray[])
{
   cout << "Welcome to the IE Decimal Conversion Program!\n\n"
        << "To choose a conversion, enter a number from the menu below\n\n"
        << "1) Decimal to Binary\n"
        << "2) Quit the program\n" << endl;
   cin >> option;
   switch (option)
   {
   case 1:
       mathoption1(decimal);
       outputoption1(decimal, binaryarray[]);
       break;
   case 2:
       break;
   default:
       cout << "ERROR: Please make a valid selection" << endl;
       menu(option, decimal, binaryarray);
   }
}
void mathoption1(int &decimal)
{
    cout << "Please input the decimal you want to convert to binary/n/n";
    cin >> decimal;
    int x = 0;
    int binaryarray[32];
    while (decimal != 0)
    {
        binaryarray[x] = decimal % 2;
        x++;
        decimal = decimal / 2;
    }
}
void outputoption1(int decimal, int binaryarray[])
{
    int x = 0;
    cout << "Your original decimal value of " << decimal << " is equivalent to the following binary value:\n";
    for (int y = x - 1; y >= 0; y--)
    {
        cout << binaryarray[y];
    }
}
Any help/input/advice would be greatly appreciated.
Not sure how to cut and paste errors, but they are listed below: syntax error: ']' @ line 47
expected an expression @ line 47
EDIT: Code Updated to correct MENU parameters.
 
     
     
     
    