Commando <[EMAIL PROTECTED]> nous disait :

> int i = 1;
> int &r = i;     // r is a reference to i
> int *p = &i;    // p is a pointer to i
>
> // All of these print 1
> cout << "i =" << i << endl;
> cout << "r=" << r << endl;
> cout << "*p=" << p << endl;

Wouldn't it be :
cout << "*p=" << *p << endl;

?? There, if you draw put 'p' in cout, it'll display the memory adress of
the variable pointed by p (i in this case).

> // This prints a memory address
> cout << "p=" << p << endl;

ok, that's what I said just up ;)

     - Cortex : HL Albator coder and mapper ( www.hlalbator.fr.st )
     - email : [EMAIL PROTECTED]  &  ICQ : 71548738



_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders

Reply via email to