Reference operator ( & )
andy = 25;
fred = andy;
ted = &andy;

Dereference operator (*)
beth = *ted;

Declaring variables of pointer types
type * name;
Just another WordPress.com weblog
Reference operator ( & )
andy = 25;
fred = andy;
ted = &andy;

Dereference operator (*)
beth = *ted;

Declaring variables of pointer types
type * name;
Hi,
Can U Tell me How Pointers Rule Applies in C++…
basically, in c++, it always passes by value of the variable..
unless you want a pointer, you hav to make use of prefix & to the variable name. to accept the pointer, the variable has to be declared with * prefixed. If you are referencing a pointer, using the variable directly only gives u the address. To get a actual value from the pointer, prefix with * to return the exact value of that variable