Use pointers when you want multiple references (aliases) to the same object or a dynamic data structure. If you really just want to pass something by reference to avoid copying, use a reference instead. In fact, pass a class by value if the copying overhead isn't too high and you don't care about polymorphism (for example, if the class has no virtual functions).
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.
Generated with WebMaker