Insertion using functions in C++

This program inserts a given number into an integer array. The location is also taken from the user.

void insert_array(int, int, int,int []);
void main()
int a[20],x,loc,n;
cout<<"Enter the number of elements"; cin>>n;
for(int i = 0;i>a[i];

cout<<"Enter the number and location"; cin>>x>>loc;
void insert_array(int x,int loc,int n,int a[])
int b;
if(n<19) { b=n; while(b