there are some problems in my coding which showing errors C2664 and C2562. i have no idea how to fix it...wish someone can point the problems and solutions too...
#include <iostream>
using namespace std;
const int listSize = 10;
void fillArray(int list[],int listSize);
void largest(const int list[],int listSize);
void printArray (const int list[], int listSize);
int main()
{
int a;
int b;
cout<<"please enter the number pancakes that eaten by 10 peoples."<<endl;
fillArray(a,b);
printArray(a,b);
return 1;
}
void fillArray(int list[], int listSize)
{
int index;
for(index=0;index<listSize;index++)
cin>>list[index];
}
void printArray(const int list[],int listSize)
{
int index;
for(index=0;index<listSize;index++)
cout<<list[index]<<" ";
}
void largest(const int list[],int listSize)
{
int index;
int maxIndex=0;
for (index =1; index<listSize;index++)
if (list[maxIndex]<list[index])
maxIndex=index;
return maxIndex;
}