Having a problem with pass by reference in two dimensional array in c++
<p>I have a variable called <code>names</code> which is a two dimensional array. 
I declared it like below so that there will be maximum of 5 names and each name will consist of 256 characters. </p>

<pre><code>int main(){
    char names[5][256];
    strcpy(names[0],"John");
    strcpy(names[1],"Matt");
    printf("%d\n",sizeof(names)/256);        //this prints out 5 which is correct
    passit(names);             
}

void passit(char names[][256]){
    printf("%d\n",sizeof(names)/256);        //this prints out 8 which seems to be a size of pointer
} 
</code></pre>

<p>How should I change this so that in <code>passit</code> function, number of elements will be printed correctly?</p>
