You should setup your 2d array with something like this int myArray[2][3] = { {1,2,3}, {4,5,6}}; Also to you can't pass a 2d array like that. The compiler needs to know how many columns there are in each row. So something like this void dispArray(int array[][3]) I would also suggest avoid using magic numbers such as 2 and 3.
If you don't know the size of the array at run time I think there is a problem with your program. Maybe you mean you don't know the size at compile time? For that you could either use templates or pass the size to the function.
And remember Variable Length Arrays are not supported by the current C++ standard, so if you don't know the size of the array at compile time you'll either need to use new/delete to create your array or use std::vector instead.