TIP: Click on subject to list as thread! ANSI
echo: c_plusplus
to: THOMAS MAEDER
from: DANIEL JONES
date: 1997-08-04 17:04:00
subject: Sunir ventures into C++

TM> AT> It is more like syntax sugar to me.
TM> Same for me. It syntactic  sugar,  needed  for  operator  overloadin
TM> useful in many other cases.
TM> AT> Instead  of  writing   *var argument  definition and *var
TM> AT> where you use it, you just write  &var
TM> It's  * const var which replaced by  &var; it's not poss
TM> to modify the target of a reference.
??? Since when? This program works just fine on my system:
#include 
void ModViaRef(int &j);
int main()
{
    int i = 5;
    cout << "i = " << i << endl;
    ModViaRef(i);
    cout << "i = " << i << endl;
    return 0;
}
void ModViaRef(int &j)
{
    j = 10;
}
Regards,
Daniel              ddjones@pinn.net
---
 þ RM 1.31 1604 þ A revolving lithic conglomerate accrues no lichen.
---------------
* Origin: Selective Source Virginia Beach, VA (757)471-6776 (1:275/102)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.