AW: Embarassing newbie question
Stebich Frank
Frank.Stebich at icn.siemens.de
Wed Aug 4 12:01:39 BST 1999
> -----Ursprüngliche Nachricht-----
> Von: Albert Wagner [SMTP:alwagner at tcac.net]
> Gesendet am: Mittwoch, 4. August 1999 06:13
> An: KDevelop
> Betreff: Embarassing newbie question
>
> Sorry, did c++ too long ago. Don't understand notation conventions.
> What does the "&" mean in the first and second instance below?
> What about the "p"?
>
> QPoint& operator+= ( const QPoint & p )
>
[Stebich Frank]
This construct is called a reference. A reference is
another name for a memory object. An example:
1: void inc( int &i)
2: {
3: i++;
4: }
5:
6: void main()
7: {
8: int a = 5;
9: inc( a);
10: }
The function called in line 9 changes the variable a.
Frank Stebich
Siemens AG, ICN WN AN E22
Brandteichstr. 25, 17489 Greifswald
Tel.: +49 3834 555-736, Fax: +49 3834 555-693, E-Mail:
frank.stebich at icn.siemens.de
More information about the KDevelop
mailing list