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

Threaded View

  1. #13
    Lindley is offline Elite Member Power Poster
    Join Date
    Oct 2007
    Location
    Seattle, WA
    Posts
    10,895

    Re: pointers--when to use them

    That particular example is probably a bad idea.

    However, good C++ programmers will always prefer references over pointers when all else is equal, since they're, indeed, harder to **** up.

    That's what it always comes down to at the end of the day. Write your code in whatever style makes it hardest to do something stupid, and easiest to see at a glance what's going on.
    Last edited by Lindley; May 28th, 2009 at 04:13 PM.

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