I am getting an error when calling upon my function choice I cannot seem to figure it out, any help would be appreciated. choice in theory will take the input of response and then follow the switch. I just need help getting the function to link. this is homework (yes I plan on doing it myself just looking for a jumpstart where I'm stuck")
#include <iostream>
using namespace std;
int menu ();
int response();
int choice(int);
int main ()
{
int list [MAXSIZE]= {0};
int size = 0;
int returned = response();
while (response () != 6)
menu();
response ();
choice (response());
getchar();
}
int menu ()
{
cout << "welcome to Curtis' Array sorting program" << endl;
cout << "1. Print the List" << endl;
cout << "2. Add to the list"<< endl;
cout << "6. Exit the Program" << endl;
return 0;
}
int response()
{
int responds= 0;
cout << "what would you like to do?";
cin>> responds;
return responds;
}
int choice ( int response())
{
switch (response())
{
case 1:
// printList (list , size);
cout << "your in the switch";
break;
case 2:
addNumber();
break;
case 3:
case 4:
case 5:
case 6:
default:
cout << "not a valid option";
break;
}
return 0;
}
double addNumber ()
{ double returnHolder;
cout << "Please enter your integer";
cin >> returnHolder;
return returnHolder;
}
double printList (int list [] , int size)
{
int counter = 0;
int number = 2;
for (counter = 0; counter < MAXSIZE; counter++)
cout << list [counter] << " ";
return number ;
}