DIR Return Create A Forum - Home
---------------------------------------------------------
techsuns
HTML https://techsuns.createaforum.com
---------------------------------------------------------
*****************************************************
DIR Return to: Programming Questions
*****************************************************
#Post#: 459--------------------------------------------------
pointer references
By: vsr Date: March 11, 2013, 10:48 am
---------------------------------------------------------
what is the difference between
void f(int *x), void f(int &x), void f(int* &x).
Explain with examples.
#Post#: 461--------------------------------------------------
Re: pointer references
By: Neela Date: March 11, 2013, 11:34 pm
---------------------------------------------------------
int &x is just an alias of integer variable x and does not have
any memory location allocated for it
int *x is a pointer to integer variable x and does have a memory
location allocated for it
* &x is again an alias to the pointer of integer variable x and
so does not have an assigned memory location
#Post#: 462--------------------------------------------------
Re: pointer references
By: dinesh Date: March 12, 2013, 1:26 am
---------------------------------------------------------
So, what are the advantages of using each of the following as a
function argument type?
#Post#: 463--------------------------------------------------
Re: pointer references
By: kpr29 Date: March 12, 2013, 1:44 am
---------------------------------------------------------
@Bros: Which language u are talking about -- C or
C++............
I think alias is concept in C++, I dont know about C..........
kp.
*****************************************************