hello everyone I am trying to create an array that will prompt the user for 5 numbers in the array and simply display them. but I keep geting this error message saying i have too many arguments in my function... please help. here is my code:
#include <iostream>
using namespace std;
void readList(int nums [], int size);
void printList( int list[1000]);
int main()
{
int theList[1000];
readList (theList, 5);
printList (theList, 5);
return 0;
}
void printList( int list[1000])
{
int i;
for(i = 0; i < 1000; i++)
cout << list[i] << endl;
}
void readList(int nums [], int size)
{
int i;
for(i=0; i < 5; i++)
cout << "Enter the " << i + 1 << " number";
cin >> nums[i];
}