If you want the function to change the value of the variable passed, you can pass the address of the variable to the function, as long as you tell the compiler in the function prototype that it expects an address to be passed.
Code:
void convert ( int* ); // expects pointer
int main()
{
int num = 5;
cout << "Value is: " << num << endl;
// pass address of variable
convert ( &num );
cout << "\nNew values is: " << num << endl;
return 0;
}
void convert ( int *Ptr )
{
*Ptr = *Ptr * *Ptr;
}
Just to show how to pass a pointer to a function. Without code it is hard to know what you mean