Reference & Pointer :: C++

This is a discussion on Reference & Pointer :: C++ within the C++ Programming forums, part of the General Programming Boards category; Performancewise, is it better to pass by reference or pass by pointer if applicable? Thanks, Kuphryn...

  1. #1
    Registered User
    Join Date
    Nov 2001
    Posts
    1,348

    Reference & Pointer :: C++

    Performancewise, is it better to pass by reference or pass by pointer if applicable?

    Thanks,
    Kuphryn

  2. #2
    Registered User rmullen3's Avatar
    Join Date
    Nov 2001
    Posts
    330

    To quote from "C++ How To"...

    "1. Use References instead of pointers for efficiency"

    = )

  3. #3
    Registered User
    Join Date
    Nov 2001
    Posts
    1,348
    Okay. Thanks.

    Oh oh. Looks like I need to go back to my notes in C++ How To...

    Kuphryn

  4. #4
    Unregistered
    Guest
    To quote from my C++ How to....

    Deitel & Deitel Software Engineering Observation:
    For the combined reasons of clarity and performance, many C++ programmers perfer that modifiable arguments be passed to functions by using pointers, small non-modifiable arguments be passed call-by-value, and large non-modifiable arguements be passed to functions by using references to constants.

    Ted

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 5
    Last Post: 04-04-2009, 03:45 AM
  2. Using Vectors. MinGW warning
    By Viewer in forum C++ Programming
    Replies: 9
    Last Post: 03-26-2009, 03:15 PM
  3. Strange/false errors
    By Ganoosh in forum Windows Programming
    Replies: 8
    Last Post: 10-20-2005, 04:54 PM
  4. Textbox
    By maxorator in forum Windows Programming
    Replies: 20
    Last Post: 09-25-2005, 10:04 AM
  5. C++ pointer vs reference
    By C-Dumbie in forum C++ Programming
    Replies: 4
    Last Post: 11-04-2002, 03:08 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21