In C++, you can do this by passing the array by reference:<p><pre><code> void foo(int (&foo)[10]) {}
</code></pre>
However, that is not "minimum of 10" but "exactly 10".<p>You can also get the size at compile time:<p><pre><code> template <size_t N> void foo(int (&foo)[N]) { int newarry[N+2]; }
</code></pre>
I've used the above for something like this:<p><pre><code> template <size_t N> void safe_strcpy(char (&buf)[N], const char *src) {
strncpy(buf, src, N-1);
buf[N-1] = 0;
}</code></pre>