No. Every time you pass an array to a function, a pointer to its initial element is passed. So that you will have to handle that argument as a pointer. To be more safe you could use a STL Vector instead of built in array
I thought about using a template array already, sajithshn. It's pretty much based on the auto_ptr or smart pointer class. I've started replacing ordinary arrays with my own. I no longer use ordinary arrays unless I have to.
1 2
int NormalArray[ 3 ]; // Ordinary array.
FixedArray < int > MyFixedArray( 3, 0 ); // My version of the array.
I've got two array class, both are templates. The first one is allocated from the heap and released on destruction. The second is placed on the stack. Both classes have member functions that perform operations on the array it holds, such as swapping to values, releasing the array at any time( heap version only ) as well as re-building the array with different values( heap version only ).