This is code I’ve written for an array that has 14 slots, each should have 4 in it except for the 6th and 13th slot, which are reverted back to 0. However, it doesn’t compile. Does anyone know what I did wrong here?
using namespace std;
#include <iostream>
const int MAX = 14;
int main ()
{
void printArray ();
system ("pause");
return 0;
}
void startArray (int beadArray[MAX])
{
for(int i=0; i<MAX; i++)
{
beadArray[i]=4;
}
beadArray[6]=0;
beadArray[13]=0;
}
//**********************************************//
void printArray ()
{
startArray (int beadArray[MAX]);
for(int i=0; i<MAX; i++)
{
cout<<i;
}
}
Some corrected mistakes :
.