Pass my reference - Reference variables
-----------------------------------------------
void newVal(int& num1,int& num2)
{
.
.
.
}
newVal(num1,num2);
Pass my reference - Using Pointers
-----------------------------------------------
void newVal(int *num1,int *num2)
{
.
.
.
}
newVal(&num1,&num2);
does this assembly code of the function call for newVal() look the same if i were to use pointers and reference variables?
-----------------------------------------------
void newVal(int& num1,int& num2)
{
.
.
.
}
newVal(num1,num2);
Pass my reference - Using Pointers
-----------------------------------------------
void newVal(int *num1,int *num2)
{
.
.
.
}
newVal(&num1,&num2);
does this assembly code of the function call for newVal() look the same if i were to use pointers and reference variables?
Use your compiler to generate an assembly listing to verify for yourself what the assembly language would look like.