reference to self ... so to speak

This is a discussion on reference to self ... so to speak within the C++ Programming forums, part of the General Programming Boards category; Originally Posted by laserlight "Pass by reference" is a parameter passing method in the literature. It can be implemented via ...

  1. #31
    C++まいる!Cをこわせ! Elysia's Avatar
    Join Date
    Oct 2007
    Posts
    22,620
    Quote Originally Posted by laserlight View Post
    "Pass by reference" is a parameter passing method in the literature. It can be implemented via pointers, C++ references, etc.
    I realize it may have further meanings and can indeed mean both things, but I will have to disagree.
    In C, you can only pass by pointer. It's etched into the language.

    Also, if you're talking programming languages, it's better to use programming-language specific words over more general ones.
    If I say, you should store a reference to that and that, it might imply, in C++, that you should actually store a reference, and not a pointer.

    So long story short, it's pass by pointer or nothing in my book, though not necessarily anyone else's.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  2. #32
    pronounced 'fib' FillYourBrain's Avatar
    Join Date
    Aug 2002
    Posts
    2,297
    I concur with the majority opinion. C++ provides two ways to "pass by reference". Blame Stroustrup for calling one of them "reference" to confuse the issue.
    "You are stupid! You are stupid! Oh, and don't forget, you are STUPID!" - Dexter

  3. #33
    Banned master5001's Avatar
    Join Date
    Aug 2001
    Location
    Visalia, CA, USA
    Posts
    3,685
    In C references (&) do not exist. Which I am well aware that you know. Bleh... laserlight, just close the thread.

  4. #34
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    21,745
    Quote Originally Posted by Elysia
    In C, you can only pass by pointer. It's etched into the language.
    No, in C, you can only pass by value.

    Quote Originally Posted by Elysia
    Also, if you're talking programming languages, it's better to use programming-language specific words over more general ones.
    The phrase is in the programming language literature.
    C + C++ Compiler: MinGW port of GCC
    Version Control System: Bazaar

    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  5. #35
    C++まいる!Cをこわせ! Elysia's Avatar
    Join Date
    Oct 2007
    Posts
    22,620
    Thanks for the correction.
    Anyway, this is pointless. No more arguments from me.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  6. #36
    Banned master5001's Avatar
    Join Date
    Aug 2001
    Location
    Visalia, CA, USA
    Posts
    3,685
    Likewise. No hostility or arguments here. I just hate to see stuff drag out aimlessly. This is what happens when beginners aren't posting fun to answer questions :P

  7. #37
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    21,745
    This is what happens when beginners aren't posting fun to answer questions :P
    Go check the C forum
    C + C++ Compiler: MinGW port of GCC
    Version Control System: Bazaar

    Look up a C++ Reference and learn How To Ask Questions The Smart Way

Page 3 of 3 FirstFirst 123
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Getting an error with OpenGL: collect2: ld returned 1 exit status
    By Lorgon Jortle in forum C++ Programming
    Replies: 6
    Last Post: 05-08-2009, 08:18 PM
  2. Undefined Reference Compiling Error
    By AlakaAlaki in forum C++ Programming
    Replies: 1
    Last Post: 06-27-2008, 11:45 AM
  3. Screwy Linker Error - VC2005
    By Tonto in forum C++ Programming
    Replies: 5
    Last Post: 06-19-2007, 02:39 PM
  4. C OpenGL Compiler Error?
    By Matt3000 in forum C Programming
    Replies: 12
    Last Post: 07-07-2006, 04:42 PM
  5. c++ linking problem for x11
    By kron in forum Linux Programming
    Replies: 1
    Last Post: 11-19-2004, 09:18 AM

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