compilation error

This is a discussion on compilation error within the C++ Programming forums, part of the General Programming Boards category; i have two file.
file1.cpp
Code:
#include<stdio.h>
void func(int A[]);
int main()
{
int A[20];
A[0]=123;
A[1]=456;
func(A);
printf(" %d",A[2]);
...