Re: pointer versus reference in constructors

From: JKop (NULL_at_NULL.NULL)
Date: 05/25/04

  • Next message: Sridhar Anupindi: "Base64 Encoding/Decoding Implementation...."
    Date: Tue, 25 May 2004 00:59:23 GMT
    
    

    DaKoadMunky posted:

    > Note: As shown by Scott Meyers in his "Effective C++" series it is
    > possible to have a null reference...
    >
    > T *ptr = 0;
    > T &ref = *ptr;
    >
    > ...but he refers to such usage as evil and states something to the
    > effect that the author of such code deserves whatever fate befalls
    > them.

    Even if they win a life-time supply of ice-cream, strawberry syrup and 100s
    'n' 1000s?

    -JKop


  • Next message: Sridhar Anupindi: "Base64 Encoding/Decoding Implementation...."

    Relevant Pages

    • Re: Net::SFTP::Attributes
      ... when I ask a simple question on the correct usage of a module I would ... If $subref is specified, for each entry in the directory, $subref will ... be called and given a reference to a hash with three keys: ...
      (comp.lang.perl.modules)
    • Re: Modifying Class Object
      ... your argument that the copied reference does not exist, ... But since it does have an effect, a memory change has been effected. ... By which you mean that henceforth, until the next assignment to t, t *refers* to the same object as s. ... But a linked list can be implemented in Python, using names as pointers. ...
      (comp.lang.python)
    • Re: Ranking British monarchs
      ... That's a usage not even remotely related to the meaning of the word ... the ones who actually did evil things and the ones who failed to do ... include say every British PM, French President, and US President has ... last monarch to try to drive policy all by himself, George III, lost ...
      (alt.talk.royalty)
    • Re: why cannot assign to function call
      ... assignment/ from the values of caller's argument expressions. ... A Java reference and a C++ reference are different things, ... the fact that X refers to that object, ...
      (comp.lang.python)
    • Re: Gender and sex
      ... I think this is for the same reason it's bad as a Scrabble ... current state of the language. ... on gender makes no reference to anything but grammatical gender. ... usage, and protect them from the whim of the hoi polloi. ...
      (talk.origins)