[Home]
[Edit this page]
[Recent Changes]
[Special Pages]
[Help]
NULL
It could be a bit confusing if you want to point to address 0x0, because in fact NULL's value is zero. However, under 32bit operating systems you don't need (and usually you are not able) to point to 0x0.
Use 0 rather than NULL [1]
[Edit this page] [Page history] [What links here] [Discuss this topic] [Printer Friendly]
NULL
NULL
NULL is a special pointer constant in C. If a pointer has a value of NULL, then it "doesn't point anywhere", it is not valid. Functions returning pointers usually return NULL on error.It could be a bit confusing if you want to point to address 0x0, because in fact NULL's value is zero. However, under 32bit operating systems you don't need (and usually you are not able) to point to 0x0.
Use 0 rather than NULL [1]
'null' links
Reference
- 1) Bjarne Stroustrup. The C++ Programming Language (3rd edition).ISBN: 0-201-88954-4 5.8.3: 'Use 0 rather than NULL'.
[Edit this page] [Page history] [What links here] [Discuss this topic] [Printer Friendly]
