Embarassing newbie question

Jacek Wojdel wojdel at kbs.twi.tudelft.nl
Wed Aug 4 07:42:14 BST 1999


-----BEGIN PGP SIGNED MESSAGE-----

On Wed, 04 Aug 1999, you wrote:
> 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 )
>
> Is this notation convention described anywhere in KDevelop documentation
> or do I need a new c++ book? What are your favorites?
	Hi,
Both mean the same, the reference to a value (the object 'p' passed to function
and something returned by it). Passing references means less overhead because
the object is not copied, but one has to be carefull about the consequences (for
sure passing a reference when parameter is declared 'const' is a good idea).
As about the book, I suggest the basics:

The C++ Programming Language
by Bjarne Stroustrup

I remember Polish translation of it as being very helpfull though a bit unhandy
(three BIG volumes).
Regards,
	Jacek
--
+-------------------------------------+
|from: J.C.Wojdel                     |
|      J.C.Wojdel at cs.tudelft.nl       |
+-------------------------------------+

-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 5.0i for non-commercial use
MessageID: PCBvsSBgNgaWCOCSm1n9TOVyG1IgCqR8

iQCVAwUBN6fj8IWy7tU6a5rbAQE/WQQApgfnEm9mEFms4L/JJpbGggAGqYWMzbRM
yVYehxATYc1g8iQn8LeIVWhPWk+865uyzmwJEPw5h3u+Z7cWNyWBaZo3MYF/WcYy
wsn7mEiGskWa+gLLOhvsEYz65ZU+gwH+fvnWnd7OJQ632qJ0fN+qekX3SAN441Db
Rt/qGMVkcak=
=d/um
-----END PGP SIGNATURE-----



More information about the KDevelop mailing list