Possible Duplicate:
Sizeof array passed as parameter
I am being stupid with this sizeof operator in c++, do you have any idea why it is 4 and 12 ?
void function (int arg[]) {
cout<<sizeof(arg)<<endl; // 4
}
int main ()
{
int array[] = {1, 2, 3};
cout<<sizeof array<<endl; // 12
function (array);
return 0;
}