what is wrong? In line 25 I get 2 errors errorc 2065 indicating index is not identified and 2143 sysntax missing semi-colon (;} before string. In line 43 error msg 2447 "{": missing function header(old style format list. I cannot finish program. Please correct & help me.
#include <iostream>
#include <string>
using namespace std;
void printArray(int unigueNumbers[], int arraySize);
int gatherNumbers(int uniqueNumbers[], int arraySize);
bool checkForNoDuplicate(int uniqueNumbers[], int arraySize, int number);
int validateNumberRange(int number);
int main()
{
const int ARRAY_SIZE = 20;
int uniqueNumbers[ARRAY_SIZE] = {0};
int countOfUnique = 0;
countOfUnique = gatherNumbers(uniqueNumbers, ARRAY_SIZE);
cout<<"/n/n ***** The Unique Numbers are ***** \n";
printArray(uniqueNumbers, countOfUnique);
system ("pause");
}
void printArray(int uniqueNumbers[], int arraySize)
{
for(int index = 0; index<arraySize; index++)
cout<<"Unique Number"<<index"\t"<<uniqueNumbers[index]<<endl;
}
int gatherNumbers(int uniqueNumbers[], int arraySize)
{
int number;
int uniqueIndex = 0;
for (int index = 0; index<arraySize; index++)
{
cout<<" Enter a number between 10 and 100: \t";
cin>>number;
number = validateNumberRange(number);
if(checkForNoDuplicate(uniqueNumbers, arraySize, number))
uniqueNumbers[uniqueIndex++] = number;
}
return uniqueIndex;
}
bool checkForNoDuplicate(int uniqueNumbers[], int arraySize, int number);
{
for(int index = 0; index<arraySize; index++)
if(number == uniqueNumbers[index])
return false;
return true;
}
int validateNumberRange(int number)
{
while(number <10 || number >100)
{
cout<<"ERROR: Enter a number between 10 and 100 \t";
cin>>number;
}
return number;
}