View Single Post
Old 06-27-2005, 10:57 PM   #10 (permalink)
Valmont
[code][/code] enforcer
 
Valmont's Avatar
 
Join Date: Mar 2003
Location: Netherlands
Posts: 1,544
Valmont is on a distinguished road
It is more efficient programming style.
Initializing objects (instead of assigning them) prevents possible creation of temporary objects. Temporary objects are simple objects as well, so they may call a run-time costly constructor. By initializing them we prevent them. For const objects one *must* initialize objects the way I do.

Once you learned the way of pointers you should check out my tutorial on the Rule of Three in the tutorial section. There you'll see with graphix the difference between assignment and initialization. The difference may be huge!
__________________
Valmont is offline   Reply With Quote