Re: Problem with using "pEdge==NULL"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jeffrey Holle skrev:
> I'm creating an application that attempted to employ the statement:
>   if(m_future.getEdges().second!=NULL)
Since this is C++ you should not use NULL anyway. so the above code
should be
  if (m_future.getEdges().second)

(See the book by Bjarne Stroustrup, the creator of C++, "The C++
Programming Language", published in year 2000: quote from page 88:
"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." At page
433, he calls the NULL macro "infamous".)

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux