Porting C++ 32-bit code on 64-bit Solaris

Hi,
I am trying to convert 32-bit code to 64-bit.

I have defined function

int main()
{
int* l;
size_t len1;
fun(len1);
return 0;
}

void fun(int* ptr)
{
cout<<"\nsizeof(ptr)"<<sizeof(ptr);
}

However while compiling getting error as :
Error: Formal argument ptr of type unsigned long* in call to fun(unsigned long*) is being passed unsigned long.

That's probably because you're passing len1 by-value instead of by-reference. I'm guessing you rather want fun(l), instead of fun(len1).

Thanks pludi.
I solved the problem.