Home

"Joshua Cranmer" <Pidgeot18@verizon.net> wrote in message
news:VUtLi.1941$1d2.688@trndny05...
> Summercool wrote:
>> Can we confirm the following? also someone said, Java also has
>> "reference" like in C++, which is an "implicit pointer":
>>
>> Pointer and Reference
>> ---------------------
>>
>> I am starting to see what pointer and reference are and how they
>> relate
>> to each other.
>>
>> in the C era, a pointer *is* a reference. that's why when we have
>>
>> int a = 10;
>> int *pi = &a;
>>
>> and you can "dereference it":
>>
>> *pi = 20;
>>
>> Until when C++ comes along, then we have a new "reference":
>>
>> int a = 10;
>> int i =& a; // or int i = &a; i am not sure about the syntax.
>
> int i = &a; is the syntax.

ITYM int& i = a;

Best wishes,
Stu

<snip>

previous
next

Re: Ipc mechanisms and designs.
Re: gui toolkits: the real story? (Tkinter, PyGTK, etc.)
Re: explicit copy constructor
Re: keep splitting the atom question
Re: Comeau and G++ disagree. Compiler bug?
Fundacja Iskierka
Dzieci Niczyje
Niechciane i Zapomniane
Fundacja Sloneczko
Mam Marzenie