Followup: NULL macro vs. 0 as null pointer?

From: Ken (kk_oop_at_yahoo.com)
Date: 07/23/04


Date: 23 Jul 2004 09:01:16 -0700

Hi. This is a followup to my NULL macro vs. 0 question. It's in a
separate thread, because I need to post using google, so my original
thread isn't available to me yet :(.

Anyway, I just noticed that in Stroustrup's book, he says (section
5.1.1, The C++ Programming Language):

"In C, it has been popular to define a macro NULL to represent the
zero pointer. Because of C++'s tighter type checking, the use of
plain 0, rather than any suggested NULL macro, leads to fewer
problems."

Could someone explain how the tighter type checking plays a role, and
what problems are being avoided?

Thanks again,

Ken



Relevant Pages

  • Re: Followup: NULL macro vs. 0 as null pointer?
    ... This is a followup to my NULL macro vs. 0 question. ... > separate thread, because I need to post using google, so my original ...
    (comp.lang.cpp)
  • Re: Followup: NULL macro vs. 0 as null pointer?
    ... > separate thread, because I need to post using google, so my original ... it has been popular to define a macro NULL to represent the ... In C++ conversion from a pointer to void to any other pointer requires ...
    (comp.lang.cpp)
  • Free Google Search Volume Scraper
    ... Excel/VBA macro which scrapes Google Search volume from a ... Excel and graph it, or whatever. ...
    (sci.stat.math)
  • Code Execution has been Interrupted
    ... macro run. ... on the same lines twice. ... When I tried to google this, I came across a handful of ...
    (microsoft.public.excel.programming)
  • Re: MAKEWORD( )
    ... can anyone tell me wht is the significance of calling MAKEWORD() ... it's a macro that I wrote long ago - before MS even had their own ... Google doesn't know everything. ...
    (comp.lang.c)