The array inside the function is a local variable. It will be deleted when the control will be pass outside the function. So it is better to declare the array in the main and pass it as argument to the function.
vlad is right, just make sure you indicate the size of the 2nd dimension of your array in your function prototype.
He is assuming, and I am too, that you are not familiar with dynamic data. If you are, then you are able to create within your function a custom-tailored array, and return the address of its first element back to main. More on that, if you are accepting to listen that is.
#include <iostream>
void func( int array[][3] )
{
//do stuff with array here, for example add one to everything
for( int j = 0; j < 2; j++ )
for( int i = 0; i < 3; i++ )
array[ j ][ i ]++;
}
int main()
{
int array[][3] = {{ 1, 2, 3 }, { 4, 5, 6 }};
func( array );
//lets check to see if one was added to everything
for( int j = 0; j < 2; j++ )
for( int i = 0; i < 3; i++ )
std::cout << array[ j ][ i ] << " ";
return 0;
}