'a' was not declared in this scope. I can't spot the error. Pls advise.
#include <iostream>
#include <cstdlib>
#include <ctime>
using namespace std;
const int MAX = 10;
void constructArray_2 (int*, int);
int main ()
{
srand (time (NULL));
constructArray_2 (a, MAX);
}
void constructArray_2 (int *a, int size)
{
for (int i = 0; i < size; i++)
{
*a = rand () % 10;
++a;
}
}