Possible Duplicate:
What are the differences between pointer variable and reference variable in C++?
For example, I have two functions that do the same thing:
int func(int &a)
{
   return a+1;
}
and
int func2(int *a)
{
   return *a+1;
}
What is the advantage of using func over func2 when calling any one of these functions?
 
     
     
     
     
     
    