CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 15 of 43

Threaded View

  1. #14
    Join Date
    May 2009
    Posts
    2,413

    Re: When to use pointers?

    Quote Originally Posted by OReubens View Post
    As a general rule concerning pointers and references...
    Use references. Use pointers only when references won't do.
    Just a clarification please. Does this mean you consider it a general rule in C++ to avoid heap allocation of objects? That dynamic allocation always should be used only as a last resort?
    Last edited by nuzzle; April 8th, 2013 at 01:23 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured